# High-Tc Superconductivity in doped boron-carbon clathrates

Simone di Cataldo  Dipartimento di Fisica, Sapienza Università di Roma, 00185
Roma, Italy  Institute of Theoretical and Computational Physics, Graz
University of Technology, NAWI Graz, 8010 Graz, Austria  Shadi Qulaghasi
Dipartimento di Fisica, Sapienza Università di Roma, 00185 Roma, Italy
Giovanni B. Bachelet  Dipartimento di Fisica, Sapienza Università di Roma,
00185 Roma, Italy  Lilia Boeri<EMAIL_ADDRESS>Dipartimento di
Fisica, Sapienza Università di Roma, 00185 Roma, Italy

(August 27, 2024)

###### Abstract

We report a high-throughput ab-initio study of the thermodynamic and
superconducting properties of the recently synthesized $X$B3C3 clathrates.
These compounds, in which boron and carbon form a sponge-like network of
interconnected cages each enclosing a central $X$ atom, are attractive
candidates to achieve high-$T_{\text{c}}$ conventional superconductivity at
ambient pressure, due to the simultaneous presence of a stiff B–C covalent
network and a tunable charge reservoir, provided by the guest atom. Ternary
compounds like CaB3C3, SrB3C3 and BaB3C3 are predicted to exhibit
$T_{\text{c}}$$\lesssim 50K$ at moderate or ambient pressures, which may
further increase up to 77$\leavevmode\nobreak\ K$ if the original compounds
are hole-doped by replacing the divalent alkaline earth with a monovalent
alkali metal to form ordered $XY$B6C6 alloys.

###### pacs:

##  I Introduction

The hydride rush initiated by the report of a superconducting critical
temperature ($T_{\text{c}}$) of 203 K in SH3 Drozdov  _et al._ (2015); Duan
_et al._ (2014) completely reshaped the landscape of research on
superconductivity, delivering the first example of room-temperature
superconductivity after more than one century since its discovery, Snider et
al. (2020) and introducing a new paradigm for material prediction heavily
relying on computational methods. Semenok  _et al._ (2018); Bi  _et al._
(2018); Boeri and Bachelet (2019); Pickard et al. (2020); Livas et al. (2020);
Sanna et al. (2020); Boeri  _et al._ (2021)

The focus of the field is gradually shifting from achieving ever larger
$T_{\text{c}}$’s to finding new high-$T_{\text{c}}$ materials which can
operate at (or close to) ambient pressure. Migdal-Eliashberg theory for
superconductivity suggests that, besides hydrides, Chen  _et al._ (2021); Di
Cataldo et al. (2021) obvious candidates for observing high-$T_{\text{c}}$
superconductivity from conventional (electron-phonon, hereafter e-ph )
interaction are light-element compounds. In particular, boron and/or carbon
compounds combine large phonon frequencies and covalent bonds, the two most
important ingredients underlying high-$T_{\text{c}}$ (conventional)
superconductivity. Nagamatsu et al. (2001); An and Pickett (2001); Boeri  _et
al._ (2004) Several theoretical predictions of conceivable high-$T_{\text{c}}$
borides and carbides date back to the early 2000’s, but none of them has been
experimentally verified; Rosner et al. (2002); Calandra  _et al._ (2004);
Kolmogorov and Curtarolo (2006); Moussa et al. (2008); Savini et al. (2010)
twenty years later, the problem is being revisited with modern ab-initio
methods for structural prediction, which permit to address the thermodynamic
stability of different structures across the phase diagram. Jay et al. (2019);
Saha et al. (2020). Last year, Zhu et al. Zhu et al. (2020) reported the
formation of a previously unknown boron-carbon phase, with chemical formula
$X$B3C3, which is a structural analogue of high-$T_{\text{c}}$ sodalite
clathrate hydrides, like LaH10, YH6 etc. Drozdov  _et al._ (2018); Geballe
_et al._ (2018); Drozdov and et al. (2018); Wang  _et al._ (2012); Peng  _et
al._ (2017); Heil et al. (2019) The structure, shown in Fig. 1, consists of a
bcc lattice of interconnected truncated octahedral boron-carbon cages, each
enclosing a guest $X$ atom.

Figure 1: Crystal structure of $X$B3C3. Space group: $Pm\bar{3}n$ (223); large
blue, small brown and green spheres indicate $X$, B and C atoms, in Wyckoff
positions $2a$, $6d$, and $6c$, respectively. The yellow isosurface, obtained
for $X$=Sr but representative of the valence-band-top wavefunction for all the
$X$B3C3 compounds considered in this work (see also Fig.3), closely wraps the
network of B–C bonds (see text); electric-blue lamellas mark its cross section
at the cell boundaries.

The empty B–C cage is dynamically and thermodynamically unstable at ambient
pressure; however, a few $X$B3C3 compounds can be stabilized under pressure
and exhibit a variety of attractive physical properties, such as superhardness
(La) and ferroelectricity (Sc). Zhu et al. (2020); Zhu  _et al._ (2020);
Strobel  _et al._ (2021); Wang  _et al._ (2021)

SrB3C3, which forms in diamond anvil cells at high pressure (57 GPa), but
survives close to room pressure, has been theoretically predicted to
superconduct below 40 K, Wang  _et al._ (2021) a $T_{\text{c}}$ close to the
current record for ambient-pressure conventional superconductivity, held by
magnesium diboride (MgB2). Given the extreme versatility of cage-like
structures observed in superhydrides, a suitable choice of the guest atom is
likely to attain even higher $T_{\text{c}}$ ; here we explore this
possibility, by performing a detailed study of thermodynamic and
superconducting properties of hypothetical B–C clathrates, using first-
principles methods based on Density Functional Theory (DFT). foo (a)

Our sampling of conceivable compositions starts from an overall scan of the
first 57 elements of the periodic table. We estimate the dynamical and
thermodynamic stability of the $X$B3C3 compounds with $X=$ H-La, and find that
only five (Ca, Sr,Y, Ba, La) form stable $X$B3C3 compounds, none of which
represents a substantial improvement over MgB2 in terms of $T_{\text{c}}$ and
thermodynamic stability.

We then consider the possibility of combining pairs of the above elements to
optimize the electronic properties in the direction of a higher
$T_{\text{c}}$, and find a few ordered alloys $XY$B6C6, where $X$ and $Y$ are
mono- and di-valent elements, which should exhibit critical temperatures above
the liquid nitrogen boiling point. These compounds form under pressure, but
may be quenched down to room pressure without losing their remarkable
properties; we argue that a further fine tuning of the doping level is very
likely to give their $T_{\text{c}}$ an extra boost.

##  II Computational Details

Our calculations, based on the Density Functional Theory, were performed using
`Quantum ESPRESSO` (QE), Giannozzi  _et al._ (2009, 2017) scalar-relativistic
Optimized Norm-Conserving Vanderbilt pseudopotentials,Hamann (2017) and a
Perdew-Burke-Ernzerhof exchange-correlation functional.Perdew  _et al._ (1996)
The wavefunctions were expanded using a plane-wave basis set, with a cutoff of
80 Ry. The integration over the Brillouin zone was performed on a
6$\times$6$\times$6 $\vec{k}$-space grid, using a Methfessel-PaxtonMethfessel
and Paxton (1989) smearing width of 0.06 Ry. Such a choice ensures a 0.5
meV/atom convergence of the total energy and a 0.5 meV convergence of phonon
frequencies.

The dynamical matrices and the related e-ph  matrix elements were calculated
using linear response theory.Baroni  _et al._ (2001) The Brillouin zone was
sampled on a 4$\times$4$\times$4 $\vec{q}$-grid (phonons), and the integration
of the e-ph  matrix elements was carried out on a 30$\times$30$\times$30
$\vec{k}$-grid (electrons) and a gaussian smearing width of 200 meV. The
superconducting critical temperature was estimated by numerically solving the
isotropic Éliashberg equations employing the Éliashberg functions obtained in
linear response.

##  III High-Throughput study of $X$B3C3 clathrate stability

Figure 2: Decomposition enthalpy of $X$B3C3 compounds for the first 57
elements of the periodic table ($Z\\!=\\!1...57$; the chemical symbol is shown
above for odd-$Z$ elements, below for even-$Z$ elements). The color of markers
relates to dynamical stability: blue dots indicate dynamically stable
compounds, orange dots dynamically unstable. All quantities are calculated at
$P=0$.

The main results of our initial high-throughput screening are summarized in
Fig. 2. foo (a) For each of the first 57 elements of the periodic table
($X$=H-La), we performed a full relaxation of the $X$B3C3 structure at ambient
pressure. For the relaxed structures, we computed the decomposition enthalpy
with respect to the ground-state elemental structures $\Delta
H=H(XB_{3}C_{3})-(H(X)+3H(B)+3H(C))$, where $H(XB_{3}C_{3})$ is the enthalpy
of the $X$B3C3 structure relaxed at a given pressure, and $H(X)$, $H(B)$ and
$H(C)$ are the enthalpies of the three elements in their ground-state
structure at the same pressure.foo (b) This quantity is shown on a per/atom
basis in Fig. 2; a comparison between $\Delta H(P=0\;GPa)$ and $\Delta
H(P=\;50GPa)$ is shown in Fig. S2 of the Supplemental Material SM_ .

Note that the decomposition enthalpy $\Delta H$ thus defined provides only a
lower bound on the actual formation enthalpy. The latter also includes the
decomposition into all possible binary and ternary phases on the hull, which
is unfeasible in a high-throughput study. However, a negative $\Delta H(P)$
usually indicates that the phase will survive down to pressure $P$, if formed
at higher pressure.

In our scan, only Ca, Y, and La are predicted to remain stable down to ambient
pressure; and, indeed, LaB3C3 has been experimentally reported to form at 1
atm.Strobel  _et al._ (2021)

The green-shaded region in Fig.2 indicates the range of metastability, i.e. an
energy region with $\Delta H>0$, which encloses structures that may be
synthesized under appropriate experimental conditions. Although there is no
rigorous criterion for metastability, values of $\Delta H$ ranging from a few
tens to a few hundreds meV are considered acceptable in literature; Aykol  _et
al._ (2018) here we choose $\Delta H=250$ meV, roughly corresponding to the
average $pV$ term at 50 GPa.

In addition to thermodynamic stability, Fig.2 includes information on the
dynamical (phonon) stability of $X$B3C3; compounds, estimated from linear-
response calculations on a $2^{3}$ grid in reciprocal space. foo (a) Compounds
indicated with orange symbols have real (positive) frequencies on all points
of the grid, while those with blue (empty) symbols have at least one negative
(imaginary) optical frequency, and hence are dynamically unstable. Our
criterion correctly classifies ferroelectric ScB3C3 as dynamically unstable.
Zhu  _et al._ (2020)

A first inspection of the figure reveals that the formation of $X$B3C3
structures is energetically unfavorable for most elements in the periodic
table; only three elements have negative formation enthalpies. Interestingly,
all three compounds are predicted to be also dynamically stable, which is a
strong indication that they may be synthesised, under appropriate conditions.
In addition to the thermodynamically stable compounds at zero pressure, two
more compounds, SrB3C3 and BaB3C3, which have a positive decomposition
enthalpy at ambient pressure, can be stabilized at higher pressure. The
decomposition pressures ($P_{d}$), estimated by linear interpolation of the
decomposition enthalpies between zero and 50 GPa, are 5 and 30 GPa in Sr and
Ba, respectively. The corresponding formation pressures are expected to be
significantly higher: for SrB3C3, where experimental data exist, the
difference is $\sim 50$ GPa. Assuming a similar shift, the formation pressure
of BaB3C3 could be as high as 80 GPa.

The five elements which form stable $X$B3C3 compounds (i.e. Ca, Sr, Y, Ba, La)
all belong either to the II A or to the III A group of the periodic table. An
inspection of their electronic structure and of their structural data reveals
that these elements lie in a sweet spot of valence and atomic radius;
moreover, their low electronegativity implies that, once within the B–C cage,
they are completely ionized and their valence states do not mix with B–C
states, and thus do not disrupt the stability of the structure. The dependence
of the parameter on the $X$ atom is shown in Fig. S1 of the Supplemental
Material SM_ .

##  IV Electronic Structure

Fig. 3 shows an enlargement of the electronic structure in the Fermi level
region for the five dynamically stable compounds at ambient pressure, and
their immediate neighbors in the periodic table (K, Rb, Cs), arranged by
period. For symmetry, we also include scandium, although dynamically unstable
(ferroelectricZhu  _et al._ (2020)).

Figure 3: Band structure of the nine $X$B3C3 compounds considered in this
work. The energy zero is set equal to the valence band tops, the Fermi energy
is a blue dashed line.

For each compound the energy zero is chosen in such a way as to coincide with
the top of its valence bands; the position of its Fermi level is shown as a
blue dashed line. Such a choice emphasizes the fact that the electronic bands
of $X$B3C3 compounds with $X$ belonging to the same period essentially follow
a rigid-band model: in the valence region they are of almost pure B–C
character; the guest $X$ atoms, almost completely ionized, donate their charge
to the B–C sublattice, filling its bands.

$X$B3C3 with the tri-valent guest elements Y and La are insulating: the 24
valence electrons are, in fact, sufficient to fill up the 12 B–C bonding
bands, separated by a $\sim$ 1 eV gap from the conduction bands, where
antibonding B–C and $X$ guest states do mix. Not so with Sc, whose $d$ states,
lower in energy, partially hybridize with the top of the valence band too,
resulting in a poor metal (upper right panel of Fig.3).

Replacing tri- with di- and mono-valent elements (middle and left panels of
Fig.3, respectively), the Fermi level is shifted into the valence band,
effectively doping it with holes. In Fig. 1 we show the $X$B3C3 crystal
structure with an isocontour at one fourth of the maximum value of the squared
modulus of the wavefunction at the top of the valence bands foo (c) The yellow
isosurface, obtained for $X$=Sr but representative of the valence-band-top
wavefunction for all the $X$B3C3 compounds appearing in Fig.3, closely wraps
the network of B–C bonds. Holes doped into this band will experience an
extremely strong e-ph coupling to bond-stretching phonons; a similar mechanism
is at the heart of the remarkable superconducting properties of other B–C
compounds, such as MgB2, boron-doped diamond, graphane. Nagamatsu et al.
(2001); Ekimov et al. (2004); Boeri  _et al._ (2004); Moussa et al. (2008);
Savini et al. (2010); Saha et al. (2020) In $X$B3C3, this very mechanism leads
to substantial $T_{\text{c}}$’s. For metallic structures, using linear-
response e-ph  spectra and the McMillan-Allen-Dynes formula, assuming
$\mu^{*}=0.1$, we predict $T_{\text{c}}$ values between 40 and 50 K – see
table I. For Sr and Ca, calculations are performed at zero pressure, where the
two compounds are dynamically stable; Ca has a very soft mode along the
$\Gamma-M$ line. For Ba, which is dynamically unstable at ambient pressure, we
report calculations at 30 GPa, where the compound is dynamically stable. In
all cases, e-ph  spectra are qualitatively very similar to those shown for
the doped samples in Fig. 5 – See Figs. S3 to S8 of the Supplemental Material
SM_ ; phonon frequencies extend up to $\sim 100$ meV; the e-ph  coupling is
spread over a wide range of frequencies, with a strong enhancement in the mid-
frequency region where softer bond-stretching phonons are concentrated.

| Pd |  $\Delta$HP=0 | $\omega_{\textmd{l}og}$ | $\lambda$ | $T_{\text{c}}$
---|---|---|---|---|---
| (GPa) | (meV/atom) | (meV) |  | ( K )
Ca | 0 | -91 | 17.5∗ | 1.9 | 48
Sr | 0 | +5 | 51.0 | 1.0 | 44
Ba | 30 | +203 | 49.8 | 1.1 | 50
Table 1:  Calculated superconducting properties of stable $X$B3C3 compounds;
the asterisk indicates that CaB3C3 experiences a remarked softening of one of
the optical modes between $M$ and $\Gamma$.

##  V Doping

The rigid-band behavior observed in Fig. 3 suggests that a partial
substitution at the guest site may be used to improve the superconducting
properties of alkaline-earth BC-clathrates. Fig. 4 shows an enlargement of the
electronic Density of States (DOS) of SrB3C3 in the region around the Fermi
level. It lies below the valence band top, within a $\sim 1$eV–wide pseudogap
which clearly separates a DOS shoulder, corresponding to a 1/2 hole/f.u.
doping, from an equally tall sharp peak, corresponding to a 1/4 electron
doping. While 1/4 electron doping requires a large supercell, 1/2 hole doping
may be easily simulated by a simple cubic supercell, in which half of the
divalent Sr atoms are replaced by monovalent Rb. At ambient pressure, such an
ordered alloy is 12 meV/atom more stable than isolated SrB3C3 \+ isolated
RbB3C3 , but its decomposition enthalpy with respect to the pure elements is
high: $\Delta H$=305 meV/atom. In analogy to SrB3C3, we expect that, at higher
pressure, $\Delta H$ be reduced and SrRbB6C6become stable. Following this line
of reasoning, the estimated decomposition pressure would be $P_{d}=$ 42 GPa.

For KCaB6C6 and CsBaB6C6, obtained by doping CaB3C3 and BaB3C3 with K and Cs,
respectively, the predicted decomposition pressures are 18 and 117 GPa – see
table 2. Hence, a correlation seems to emerge between the average atomic
radius and the decomposition pressure: smaller atoms require lower pressure.

Figure 4: Electronic Density of States of SrB3C3 in the vicinity of the Fermi
level (vertical dashed line). See text.

Fig. 5 shows the calculated phonon dispersions and Density of States of
SrRbB6C6, together with the e-ph  Eliashberg spectral function
$\alpha^{2}F(\omega)$. The corresponding figures for KCaB6C6 and CsBaB6C6 are
shown in the Supplemental Material SM_ . The e-ph  coupling is mostly
distributed on modes of the B–C host sublattice; a strong enhancement in the
mid-frequency region, where soft bond-stretching phonons are concentrated,
translates into a relatively low $\omega_{\textmd{l}og}$ ($\sim 44$ meV) and a
very large total e-ph coupling constant $\lambda$=1.7. Given the strong-
coupling regime, we estimated the superconducting critical temperature by
solving the full (isotropic) Migdal-Eliashberg equations. With a constant
$\mu^{*}=0.1$ we obtain a $T_{\text{c}}$  of 77 K.

Figure 5: Phonon Dispersions (left), Density of States (middle), Eliashberg
spectral function and Fermi surface (right) of SrRbB6C6 ($T_{\text{c}}$= 77
K).

Table 2 reports the relevant superconducting parameters for the other two
ordered alloys considered here. The quantities calculated at ambient pressure
for KCaB6C6 are extremely close to those estimated for SrRbB6C6. For CsBaB6C6,
which turns out to be weakly dynamically unstable at ambient pressure, we
report results at 10 GPa; at this pressure, the predicted $T_{\text{c}}$ =82
K is even slightly larger than the liquid nitrogen boiling point. These
results indicate that, while the atomic radius has a major impact on pressure,
its effect on $T_{\text{c}}$ is almost negligible.

|  $P$ ($\Delta$H=0) |  $\Delta$H ($P$=0) | $\omega_{\textmd{l}og}$ | $\lambda$ | $T_{\text{c}}$
---|---|---|---|---|---
| (GPa) | (meV/atom) | (meV) |  | ( K )
KCa | 18 | +160 | 43.9 | 1.6 | 77
SrRb | 42 | +305 | 44.0 | 1.7 | 78
CsBa | 117 | +556 | 35.4* | 2.2* | 82*
B-diam Saha et al. (2020) | – | +440 | 41.0 | 2.3 | 75
Table 2:  Predicted thermodynamic and superconducting properties of ordered
alloys $XY$B6C6; quantities are defined as in table 1. The asterisk reminds
that for CsBa the superconducting parameters were calculated at
$P\\!\\!=\\!10$ GPa (see text). In the last row we report data for 50 $\%$
B-doped diamond, from Ref. Saha et al., 2020. Note that, in that paper,
$T_{\text{c}}$ was estimated by the Mc-Millan-Allen-Dynes formula, while in
the present work we employ the full solution of Migdal-Eliashberg equations,
which is more accurate at strong coupling.

The data reported in table 2 suggest that doped $X$B3C3 compounds represent a
substantial step forward in our understanding of conventional superconductors.
Critical temperatures close to or larger than nitrogen boiling point (77 K) at
room pressure have never been reported in any conventional superconductor so
far; indeed, the current $T_{\text{c}}$ record is much lower – 39 K in MgB2.
On the last row of the table, we reported the corresponding data for heavily
(50 $\%$) B-doped diamond, which has also been predicted to exhibit
$T_{\text{c}}$’s close to 80 K. Moussa et al. (2008); Saha et al. (2020) It is
remarkable to observe that the main superconducting parameters are extremely
close, indicating similar lattice stiffness, bonding properties, nature and
distribution of the e-ph coupling between diamond and $X$B3C3 structures. The
key difference is that $\Delta H$, in heavily B-doped diamond, is so high
($\sim 440$ meV) that its experimental synthesis is likely impossible – the
highest reported B- doping levels in diamond are 4-5 times smaller – while,
according to our calculations, KCaB3C3, similarly to SrB3C3, could more easily
form at moderate pressures, and then, once formed, it may be quenched down to
ambient pressure, without spoiling its substantial $T_{\text{c}}$. In
addition, the empirical correlation between average atomic radii and
stabilization pressure, the quasi-rigid-band behavior (Fig.3) and the steep
energy dependence of the DOS at both edges of the pseudogap (Fig.4), suggest
that both the synthesis conditions and the superconducting properties may be
further improved by adjusting the doping level and/or combining atoms with
different atomic radii.

##  VI Conclusions

In conclusion, in this work we performed a broad-range study of the
thermodynamic stability and superconducting properties of $X$-doped B–C
clathrates $X$B3C3. These compounds, recently synthesized under high pressure,
are structurally related to record cage-like superhydrides like LaH10 and YH6,
while their bonding and electronic properties, determined by the covalent B–C
sublattice, are analogous to those of borides and carbides like MgB2; and
doped diamond. Nagamatsu et al. (2001); Ekimov et al. (2004)

Based on a full scan of the periodic table, we find that only five elements
(Ca, Sr, Y, Ba and La) form stable $X$B3C3 compounds at ambient or moderate
pressure. Two of them (La, Sr) have already been experimentally
synthesized.Zhu et al. (2020); Strobel  _et al._ (2021); Wang  _et al._ (2021)
While the superconducting $T_{\text{c}}$ of ternary $X$B3C3 compounds are
comparable to those of MgB2, the best conventional superconductor known so
far, ordered alloys $XY$B6C6 containing mono- and divalent elements are,
instead, expected to yield a substantial improvement, reaching
$T_{\text{c}}$’s as high as 77 K. KCaB6C6, where a high $T_{\text{c}}$;
cohexists with a relatively moderate stabilization pressure (18 GPa),
represents the most promising combination of elements among those considered
here. A careful tuning of dopants and compositions may further increase
$T_{\text{c}}$ and/or reduce stabilization pressure.

Note: While writing this manuscript, we became aware of another study on
superconductivity in doped $X$B3C3; compounds; its main results are in
excellent agreement with ours. Zhang  _et al._ (2021)

###### Acknowledgements.

The authors acknowledge support from Fondo Ateneo-Sapienza 2017-2019. The
computational resources were provided by CINECA through project IsC90-HTS-
TECH_C, the Vienna Scientific Cluster (VSC) through Project P30269-N36
(Superhydra), and the dCluster of the Graz University of Technology. We thank
Antonio Sanna for kindly sharing the code to numerically solve the isotropic
Éliashberg equations

## References

  * Drozdov  _et al._ (2015) A. P. Drozdov, M. E. M. I., I. Troyan, V. Ksenofontov, and S. Shylin, Nature 525, 73 (2015).
  * Duan  _et al._ (2014) D. Duan, Y. Liu, F. Tian, D. Li, X. Huang, Z. Zhao, H. Yu, B. Liu, W. Tian, and T. Cui, Sci. Rep. 4 (2014).
  * Snider et al. (2020) E. Snider et al., Nature 586, 373 (2020).
  * Semenok  _et al._ (2018) D. V. Semenok, I. A. Kruglov, A. G. Kvashnin, and A. R. Oganov, arXiv preprint, arXiv:1806.00865 (2018).
  * Bi  _et al._ (2018) T. Bi, N. Zarifi, T. Terpstra, and E. Zurek, arXiv preprint, arXiv:1806.00163 (2018).
  * Boeri and Bachelet (2019) L. Boeri and G. B. Bachelet, J. Phys. Condens. Matter 31, 234002 (2019).
  * Pickard et al. (2020) C. J. Pickard et al., Annu. Rev. Condens. Matter Phys. 11, 57 (2020).
  * Livas et al. (2020) J. A. F. Livas et al., Phys. Rep. (2020).
  * Sanna et al. (2020) A. Sanna et al., Phys. Rev. Lett. 125, 057001 (2020).
  * Boeri  _et al._ (2021) L. Boeri, R. G. Hennig, P. J. Hirschfeld, G. Profeta, A. Sanna, E. Zurek, W. E. Pickett, M. Amsler, R. Dias, M. Eremets, C. Heil, R. Hemley, H. Liu, Y. Ma, C. Pierleoni, A. Kolmogorov, N. Rybin, D. Novoselov, V. I. Anisimov, A. R. Oganov, C. J. Pickard, T. Bi, R. Arita, I. Errea, C. Pellegrini, R. Requist, E. Gross, E. R. Margine, S. R. Xie, y. quan, a. hire, L. Fanfarillo, G. R. Stewart, J. J. Hamlin, V. Stanev, R. S. Gonnelli, E. Piatti, D. Romanin, D. Daghero, and R. Valenti, Journal of Physics: Condensed Matter (2021).
  * Chen  _et al._ (2021) W. Chen, D. V. Semenok, X. Huang, H. Shu, X. Li, D. Duan, T. Cui, and A. R. Oganov, Phys. Rev. Lett. 127, 117001 (2021).
  * Di Cataldo et al. (2021) S. Di Cataldo et al., Phys. Rev. B 104, L020511 (2021).
  * Nagamatsu et al. (2001) J. Nagamatsu et al., Nature 410, 63 (2001).
  * An and Pickett (2001) J. M. An and W. E. Pickett, Phys. Rev. Lett. 86, 4366 (2001).
  * Boeri  _et al._ (2004) L. Boeri, J. Kortus, and O. K. Andersen, Phys. Rev. Lett. 93, 237002 (2004).
  * Rosner et al. (2002) H. Rosner et al., Phys. Rev. Lett. 88, 127001 (2002).
  * Calandra  _et al._ (2004) M. Calandra, N. Vast, and F. Mauri, Phys. Rev. B 69, 224505 (2004).
  * Kolmogorov and Curtarolo (2006) A. N. Kolmogorov and S. Curtarolo, Phys. Rev. B 73, 180501 (2006).
  * Moussa et al. (2008) J. E. Moussa et al., Phys. Rev. B 77, 064518 (2008).
  * Savini et al. (2010) G. Savini et al., Phys. Rev. Lett. 105, 037002 (2010).
  * Jay et al. (2019) A. Jay et al., J. Appl. Phys. 125, 185902 (2019).
  * Saha et al. (2020) S. Saha et al., Phys. Rev. B 102, 024519 (2020).
  * Zhu et al. (2020) L. Zhu et al., Sci. Adv. 6, eaay8361 (2020).
  * Drozdov  _et al._ (2018) A. P. Drozdov, V. Minkov, S. Besedin, P. Kong, M. Kuzovnikov, D. Knyazev, and M. Eremets, arXiv preprint, arXiv:1808.07039 (2018).
  * Geballe  _et al._ (2018) Z. M. Geballe, H. Liu, A. K. Mishra, M. Ahart, M. Somayazulu, Y. Meng, M. Baldini, and R. J. Hemley, Angewandte Chemie International Edition 57, 688 (2018).
  * Drozdov and et al. (2018) A. Drozdov and et al., arXiv preprint, arXiv:1812.01561 (2018).
  * Wang  _et al._ (2012) H. Wang, J. S. Tse, K. Tanaka, T. Iitaka, and Y. Ma, Proceedings of the National Academy of Sciences 109, 6463 (2012).
  * Peng  _et al._ (2017) F. Peng, Y. Sun, C. J. Pickard, R. J. Needs, Q. Wu, and Y. Ma, Phys. Rev. Lett. 119, 107001 (2017).
  * Heil et al. (2019) C. Heil et al., Phys. Rev. B 99, 220502 (2019).
  * Zhu  _et al._ (2020) L. Zhu, T. A. Strobel, and R. E. Cohen, Phys. Rev. Lett. 125, 127601 (2020).
  * Strobel  _et al._ (2021) T. A. Strobel, L. Zhu, P. A. Guńka, G. M. Borstad, and M. Guerette, Angewandte Chemie International Edition 60, 2877 (2021), https://onlinelibrary.wiley.com/doi/pdf/10.1002/anie.202012821 .
  * Wang  _et al._ (2021) J.-N. Wang, X.-W. Yan, and M. Gao, Phys. Rev. B 103, 144515 (2021).
  * foo (a) Computational Details can be found in sect. II.
  * Giannozzi  _et al._ (2009) P. Giannozzi, S. Baroni, N. Bonini, M. Calandra, R. Car, C. Cavazzoni, D. Ceresoli, G. L. Chiarotti, M. Cococcioni, I. Dabo, A. D. Corso, S. de Gironcoli, S. Fabris, G. Fratesi, R. Gebauer, U. Gerstmann, C. Gougoussis, A. Kokalj, M. Lazzeri, L. Martin-Samos, N. Marzari, F. Mauri, R. Mazzarello, S. Paolini, A. Pasquarello, L. Paulatto, C. Sbraccia, S. Scandolo, G. Sclauzero, A. P. Seitsonen, A. Smogunov, P. Umari, and R. M. Wentzcovitch, Journal of Physics: Condensed Matter 21, 395502 (2009).
  * Giannozzi  _et al._ (2017) P. Giannozzi, O. Andreussi, T. Brumme, O. Bunau, M. B. Nardelli, M. Calandra, R. Car, C. Cavazzoni, D. Ceresoli, M. Cococcioni, N. Colonna, I. Carnimeo, A. D. Corso, S. de Gironcoli, P. Delugas, R. A. DiStasio, A. Ferretti, A. Floris, G. Fratesi, G. Fugallo, R. Gebauer, U. Gerstmann, F. Giustino, T. Gorni, J. Jia, M. Kawamura, H.-Y. Ko, A. Kokalj, E. Kücükbenli, M. Lazzeri, M. Marsili, N. Marzari, F. Mauri, N. L. Nguyen, H.-V. Nguyen, A. O. de-la Roza, L. Paulatto, S. Poncé, D. Rocca, R. Sabatini, B. Santra, M. Schlipf, A. P. Seitsonen, A. Smogunov, I. Timrov, T. Thonhauser, P. Umari, N. Vast, X. Wu, and S. Baroni, J. Phys.: Condens. Matter 29, 465901 (2017).
  * Hamann (2017) D. R. Hamann, Phys. Rev. B 88, 085117 (2017).
  * Perdew  _et al._ (1996) J. P. Perdew, K. Burke, and M. Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996).
  * Methfessel and Paxton (1989) M. Methfessel and A. T. Paxton, Phys. Rev. B 40, 3616 (1989).
  * Baroni  _et al._ (2001) S. Baroni, S. de Gironcoli, A. Dal Corso, and P. Giannozzi, Rev. Mod. Phys. 73, 515 (2001).
  * foo (b) For all elements, we considered the ground-state structures under pressure, reported in literature; when the structures were not available, we employed structures predicted by evolutionary algorithsm (USPEX).
  * (41) The Supplemental Material is available at $xxx$.
  * Aykol  _et al._ (2018) M. Aykol, S. S. Dwaraknath, W. Sun, and K. A. Persson, Science advances 4, eaaq0148 (2018).
  * foo (c) Specifically, since the dispersion relationship at the top of the valence band is threefold degenerate, we used the average of the squared modulus of the wavefunctions for the degenerate manifold.
  * Ekimov et al. (2004) E. A. Ekimov et al., Nature 428, 542 (2004).
  * Zhang  _et al._ (2021) P. Zhang, X. Li, X. Yang, H. Wang, H. Liu, and Y. Yao, arXiv preprint, arXiv:2108.11026 (2021).


# One-shot Learning with Absolute Generalization

1st Hao Su  School of Information and Electronics
Beijing Institute of Technology
Beijing, China
<EMAIL_ADDRESS>
###### Abstract

One-shot learning is proposed to make a pretrained classifier workable on a
new dataset based on one labeled samples from each pattern. However, few of
researchers consider whether the dataset itself supports one-shot learning. In
this paper, we propose a set of definitions to explain what kind of datasets
can support one-shot learning and propose the concept “absolute
generalization”. Based on these definitions, we proposed a method to build an
absolutely generalizable classifier. The proposed method concatenates two
samples as a new single sample, and converts a classification problem to an
identity identification problem or a similarity metric problem. Experiments
demonstrate that the proposed method is superior to baseline on one-shot
learning datasets and artificial datasets. The code can be get
https://github.com/qqsuhao/One-shot-Learning-with-Absolute-Genelization

###### Index Terms:

One-shot learning, Absolute Genelization

##  I Introduction

Deep learning models have achieved great success in image classification [1]
[2]. However, in practical applications, the popularization of deep learning
models still suffer from a lot of problems. The prominent problem is that deep
learning models need a large number of labeled samples of training [3] [4],
and once the scenes are changed, previously trained models may not work
normally although the scenes change does not alter semantics about human
cognition. For example, if we train a model to recognize samples with a
certain texture of background, we may need to retrain the model once the
texture of the background changes into another style. That is, the
generalization of the model is limited, which makes it difficult for the model
trained on dataset $\mathcal{A}$ to work on dataset $\mathcal{B}$.
Fortunately, studies related to one-shot learning or few-shot learning (FSL)
in recent years may provide a solution to the problem [5].

The one-shot learning was first proposed by [6] and [7], aiming to learn
characteristics of novel patterns from a few of labeled samples and use them
for classification [8]. If one labeled sample is taken from each of the 20
novel patterns for learning, it is called 20-way one-shot learning [9]. In
general, FSL methods can be roughly divided into three categories [10] [11]:
(1) making augmentation and regularization based on prior knowledge to avoid
over-fitting of the model [12] [13]; (2) constraining hypothesis space based
on prior knowledge, including multitask learning [14] [15], embedding learning
[16] [17] and so on [18]; (3) optimizing the search strategy for parameters in
hypothesis spaces based on prior knowledge [19] [20].

Most datasets for one-shot learning are divided into two subsets: training set
and probe set, and none of these patterns of the probe set have ever appeared
in training set. The trained one-shot learning models are expected to learn
through few of labeled probe samples and be able to classify other unlabeled
probe samples. Therefore, it is regarded that one-shot learning models are
generalizable, which can work on datasets that have never been seen before
based on limited prior knowledge. If we regard the training set and probe set
as two different datasets $\mathcal{A}$ and $\mathcal{B}$, respectively, then
one-shot learning models could be regarded as a general model on both
datasets. Most researchers dedicate to study how to improve the
generalizability by adapting models themselves. However, few of them consider
the relationship between the distribution of data and the generalizability of
models. That is, the generalizability of models may depend on whether the
datasets support models to generalize. For example, if datasets $\mathcal{A}$
and $\mathcal{B}$ are totally different, those models trained on $\mathcal{A}$
certainly could not work on $\mathcal{B}$. But if $\mathcal{A}$ and
$\mathcal{B}$ are semantically identical, but distributed differently, those
models trained on $\mathcal{A}$ must could be generalized on $\mathcal{B}$
from the perspective of human cognition.

In this paper, we define an “absolute generalization” for classification from
the perspective of distribution of dataset. That is, as long as the
distribution of dataset $\mathcal{A}$ and $\mathcal{B}$ satisfies certain
conditions, models trained on the dataset $\mathcal{A}$ will be able to work
on dataset $\mathcal{B}$. We analyze the distribution of concatenated samples
coupled by two samples and propose a method to make existing methods
absolutely generalizable. The proposed method is aimed to measure the
similarity between a pair of samples without any metric measurement. Finally,
we compare our method with the baseline produced by siamese networks for
verification [15] [9].

The rest of paper is organized as follows. In the second section, we review
some related work. In the third section, we make some definitions about
“absolute generalization” and propose our method to build a absolutely
generalizable classifiers. Next, we apply experiments compared with siamese
networks as baselines in Section 4. Finally, we point out the remaining
problems and future research directions.

##  II Related work

###  II-A Image Classification

Deep learning has achieved great success in image classification [21]. Most of
these classifiers are essentially data fitting depending on labels. Consider
the forerunner of convolution neutral networks for recognition, LeNet [22],
which succeeded on MNIST dataset for classification. LeNet fits training data
to corresponding one-hot code, where appropriate optimizers, structures,
active functions and loss functions need to be considered. However, for
example, if we simply reverse the color of input images during probe phase,
these classifiers may not work normally. Although the simple operation does
not disturb human cognition, these classifiers may take a fatal blow. It is
obvious that weights in the hidden layers highly depend on the distribution of
training data. Once the distribution of probe data is changed, no matter
whether the change alters semantics of probe data, the classifier will not
make a difference. In a broad sense, we can regard that the generalizability
of classifier is low.

###  II-B One-shot learning

From the perspective of generalization, these one-shot learning models are
aimed to improve the generalizability on novel datasets. We can regard a one-
shot labeled sample as a template. That is, these one-shot learning models
recognize unlabeled samples through predicting whether they belong to the same
pattern with the template [5]. Recently, a number of one-shot learning models
have been developed. In [9], Koch et al. employed deep siamese networks for
one-shot learning on Omniglot dataset [8]. The siamese networks were first
introduced in the early 1990s by Bromley and LeCun to solve signature
verification problem [23], which aimed to measure the similarity between a
pair of samples. In [15], LeCun et al. employed two weights-shared subnetworks
(usually either CNNs or autoencoders) to extract features of a pair samples,
respectively, as shown in Figure. 1. Then, they used a contrastive energy
function which contained dual terms to decrease the energy of identical
pattern pairs and increase the energy of different pattern pairs.

Figure 1: The structure of siamese networks.

##  III Methodology

Figure 2: Schematic diagram of our method.

Figure 3: Distribution of concatenated samples after reducing dimensions with
TSNE.

###  III-A Absolute Generalization

The concept of generalization describes that how well the model works in the
probe set of a dataset. To distinguish the generic concept, we define
“absolute generalization” for two datasets $\mathcal{A}$ and $\mathcal{B}$:

###### Definition 1

The absolute generalization refers to that a model which is trained in the
dataset $\mathcal{A}$ could be employed on the dataset $\mathcal{B}$ without
extra modification, and we call that the model is absolutely generalizable.

In above definition, the two datasets are different, which is defined as
follows:

###### Definition 2

The dataset $\mathcal{A}$ is distinguished from the dataset $\mathcal{B}$ if
$f_{\mathcal{A}}(\mathbf{x})\neq f_{\mathcal{B}}(\mathbf{x})$.

Where, $f_{\mathcal{A}}(\mathbf{x})$ and $f_{\mathcal{B}}(\mathbf{x})$ are
data distributions of the dataset $\mathcal{A}$ and $\mathcal{B}$,
respectively. It’s noted that the model with absolute generalization not
always exists for any two datasets. Next, we give the existing conditions.

Assume that the dataset $\mathcal{A}$ contains two patterns which are denoted
as $\omega_{0}$ and $\omega_{1}$, respectively. So does the dataset
$\mathcal{B}$. Generally, we use the maximum posterior estimation (MAP) to
make decision in the dataset $\mathcal{A}$:

$\displaystyle\omega_{i}$
$\displaystyle=\arg\max\limits_{i}f_{\mathcal{A}}(\omega_{i}|\mathbf{x})$ (1)
$\displaystyle=\arg\max\limits_{i}\frac{f_{\mathcal{A}}(\mathbf{x}|\omega_{i})P_{\mathcal{A}}(\omega_{i})}{f_{\mathcal{A}}(\mathbf{x})},(i=0,1)$
$\displaystyle=\arg\max\limits_{i}f_{\mathcal{A}}(\mathbf{x}|\omega_{i}))P_{\mathcal{A}}(\omega_{i}),(i=0,1)$

Where, $P_{\mathcal{A}}(\omega_{i})$ denotes prior probability, which is a
constant and could be ignored if it is 0.5. Denote
$f_{\mathcal{A}}(\mathbf{x}|\omega_{i})$ as a likelihood distribution of the
dataset $\mathcal{A}$. Due to $f_{\mathcal{A}}(\mathbf{x}|\omega_{i})\neq
f_{\mathcal{B}}(\mathbf{x}|\omega_{i})$ and $f_{\mathcal{A}}(\mathbf{x})\neq
f_{\mathcal{B}}(\mathbf{x})$, or some models ignore
$f_{\mathcal{A}}(\mathbf{x})$, the classifier trained in the dataset
$\mathcal{A}$ could not be employed in the dataset $\mathcal{B}$. However, we
can relax the constraints to make the “absolute generalization” available.

Assume that the observed sample $x$ in dataset $\mathcal{A}$ and dataset
$\mathcal{B}$ is generated by the following mapping:

$\mathbf{x}=g(\mathbf{z}_{1},\mathbf{z}_{2})$ (2)

Where, denote $g(\cdot)$ as a mapping from latent space to sample space.
Denote $\mathbf{z}_{1}$ and $\mathbf{z}_{2}$ as two independent latent
variable. As shown in following, we convert the data distribution to latent
variable distribution:

$\displaystyle f_{\mathcal{A}}(\mathbf{x})\rightarrow
f_{\mathcal{A}}(\mathbf{z}_{1})f_{\mathcal{A}}(\mathbf{z}_{2})$ (3)
$\displaystyle f_{\mathcal{A}}(\mathbf{x}|\omega_{i})\rightarrow
f_{\mathcal{A}}(\mathbf{z}_{1}|\omega_{i})f_{\mathcal{A}}(\mathbf{z}_{2})$ (4)
$\displaystyle
f_{\mathcal{A}}(\mathbf{z}_{1})=\sum_{i=0}^{1}f_{\mathcal{A}}(\mathbf{z}_{1}|\omega_{i})P_{\mathcal{A}}(\omega_{i})$
(5) $\displaystyle f_{\mathcal{B}}(\mathbf{x})\rightarrow
f_{\mathcal{B}}(\mathbf{z}_{1})f_{\mathcal{B}}(\mathbf{z}_{2})$ (6)
$\displaystyle f_{\mathcal{B}}(\mathbf{x}|\omega_{i})\rightarrow
f_{\mathcal{B}}(\mathbf{z}_{1}|\omega_{i})f_{\mathcal{B}}(\mathbf{z}_{2})$ (7)
$\displaystyle
f_{\mathcal{B}}(\mathbf{z}_{1})=\sum_{i=0}^{1}f_{\mathcal{B}}(\mathbf{z}_{1}|\omega_{i})P_{\mathcal{B}}(\omega_{i})$
(8)

Because the distribution of $\mathbf{z}_{2}$ has nothing to do with patterns,
we call $f_{\mathcal{A}}(\mathbf{z}_{2})$ as the background distribution of
dataset $\mathcal{A}$.

###### Definition 3

The classifier with the absolute generalization between two datasets exits if
$f_{\mathcal{A}}(\mathbf{z}_{1}|\omega_{i})=f_{\mathcal{B}}(\mathbf{z}_{1}|\omega_{i})$
and $P_{\mathcal{A}}(\omega_{i})=P_{\mathcal{B}}(\omega_{i})$, i=0,1. In this
case, the classifier is

$\displaystyle\omega_{i}$
$\displaystyle=\arg\max\limits_{i}\frac{f_{\mathcal{A}}(\mathbf{z}_{1}|\omega_{i})P_{\mathcal{A}}(\omega_{i})}{f_{\mathcal{A}}(\mathbf{z}_{1})}$
(9)
$\displaystyle=\arg\max\limits_{i}\frac{f_{\mathcal{B}}(\mathbf{z}_{1}|\omega_{i})P_{\mathcal{B}}(\omega_{i})}{f_{\mathcal{B}}(\mathbf{z}_{1})}$

As long as we can isolate the effects of $\mathbf{z}_{2}$ when we construct a
classifier in the dataset $\mathcal{A}$, the classifier is absolutely
generalizable and could be applied in the dataset $\mathcal{B}$.

###  III-B Proposed Method

Denote sample matrices of dataset $\mathcal{A}$ and $\mathcal{B}$ as
$\mathbf{X}_{A}\in\mathbf{R}^{m\times N_{A}}$ and
$\mathbf{X}_{B}\in\mathbf{R}^{m\times N_{B}}$, respectively. $m$ denotes
dimension of samples. $N_{A}$ and $N_{B}$ denote number of the samples in
dataset, respectively. Each column of $\mathbf{X}_{A}$ is a sample vector and
so does $\mathbf{X}_{B}$. Samples of two patterns in dataset $\mathcal{A}$ are
denoted as $\mathbf{x}^{A_{0}}_{j},j=0,\cdots,n_{A_{0}}$ and
$\mathbf{x}^{A_{1}}_{k},k=0,\cdots,n_{A_{1}}$, respectively. Where
$n_{A_{0}}+n_{A_{1}}=N_{A}$.

Consider converting classification problems of two patterns to distinguishing
whether two samples belong to an identical pattern or different patterns. For
dataset $\mathcal{A}$, concatenate samples belonging to an identical pattern
and denote them as
$\mathbf{x}^{iden}_{jk}\in\mathbf{X}^{A}_{iden}=\\{\begin{bmatrix}\mathbf{x}^{A_{0}}_{j}\\\
\mathbf{x}^{A_{0}}_{k}\\\
\end{bmatrix}|j,k=0,\cdots,n_{A_{0}}\\}\bigcup\\{\begin{bmatrix}\mathbf{x}^{A_{1}}_{j}\\\
\mathbf{x}^{A_{1}}_{k}\\\ \end{bmatrix}|j,k=0,\cdots,n_{A_{1}}\\}$ and
concatenate samples belonging to different patterns and denote as
$\mathbf{x}^{diff}_{jk}\in\mathbf{X}^{A}_{diff}=\\{\begin{bmatrix}\mathbf{x}^{A_{0}}_{j}\\\
\mathbf{x}^{A_{1}}_{k}\\\
\end{bmatrix}|j=0,\cdots,n_{A_{0}};k=0,\cdots,n_{A_{1}}\\}$. For dataset
$\mathcal{B}$, similar symbols are denoted. We consider that classifiers in
the sample space spanned by $\mathbf{X}^{A}_{iden}$ and
$\mathbf{X}^{A}_{diff}$ are still executable in the sample space spanned by
$\mathbf{X}^{B}_{iden}$ and $\mathbf{X}^{B}_{diff}$ if the two datasets
satisfy Definition 3.

We take a simple example to explain the observation. Assume that $m=2$ and the
dimension of concatenated samples is 4. As shown in Figure. 2, samples of
dataset $\mathcal{A}$ are distributed in 2-dim plane $S1$ with two patterns
represented by red and blue, respectively. The 2-dim plane $S2$ is a duplicate
of $S1$. To be able to show the 4-dim space, regard $S1$ and $S2$ as two basis
plane. The two orange hollow circles denote concatenate samples belonging to
different patterns and two black hollow circles denote concatenate samples
belonging to an identical pattern. Note that two black hollow circle are
located in a hyperplane passing the origin, denoted as blue plane $S3$.
Moreover, two orange hollow circles are located on both sides of the
hyperplane $S3$. In the example, if the two datasets $\mathcal{A}$ and
$\mathcal{B}$ satisfy Definition3, the slope of decision bound in the two
datasets are the same, which confirms that the normal vector of hyperplane
$S3$ is constant. As long as we solve the normal vector in dataset
$\mathcal{A}$, it could be used in dataset $\mathcal{B}$ for classification
directly.

We use MNIST dataset to further explain our method. We concatenate two samples
from digits 0 and 1 of MNIST as a new sample and generate the sample set
$\mathbf{X}^{A}_{diff}$ and $\mathbf{X}^{A}_{iden}$. We regard the raw sample
as dataset $\mathcal{A}$ and
$\mathcal{A}=\mathbf{X}^{A}_{diff}\bigcup\mathbf{X}^{A}_{iden}$. Then, we
modify the distribution of raw data but do not alter its semantics, such as
flipping image color, adding noise and replacing texture of background. We
regard these modified dataset as dataset $\mathcal{B}$. Because dataset
$\mathcal{A}$ and $\mathcal{B}$ have the same semantic, they satisfy
Definition 3. Due to their different distributions, we regard they are two
different datasets according to Definition 2. As shown in Figure. 3, we used
t-sne [24] to reduce the dimension of concatenated samples and use different
colors to indicate different concatenate patterns. For concatenated samples
from raw data (i.e. dataset $\mathcal{A}$) denoted as blue and red, the
distribution of them is similar to our assumption in Figure. 2. The
concatenated samples from identical patterns are distributed nearly to the
same hyperplane as other modified datasets in Figure. 3.

###  III-C Models for Neural Networks

(a) Our model with MLP.

(b) Our model with CNN.

Figure 4: Framework of our model.

Our method is to couple two samples together as one new sample by
concatenating them along with a dimension. In image processing, we directly
concatenate two vectors flattened by images when employing MLP, as shown in
Figure. 4(a). When employing CNN, we can concatenate two images along with the
channel dimension, as shown in Figure. 4(b).

As explained in Section III, the output of our model represents the
normalization distance from the concatenated sample to the hyperplane. Thus, a
positive or negative output indicates that the sample is on both sides of the
plane. We also could regard the output as a probability of the concatenated
sample belonging to $\mathbf{X}^{A}_{diff}$, if limiting output to $[0,1]$. If
outputs indicate distances, employ mean square error (MSE) as loss function;
else if they indicate probabilities, binary cross entropy (BCE) is employed as
loss function.

###  III-D Comparison with Siamese Networks

Siamese networks [23] and [22] firstly proposed the idea of coupling two
samples together, where the author employed a distance measurement to describe
the similarity between two hidden features extracted by two identical
networks, respectively. However, in our method, we regard the concatenated
sample as a new sample and analyze its distribution properties aiming to
approve the generalizability of classifiers.

From the perspective of loss function, the siamese networks employ contrastive
loss function based on p-norm distance. But in our method, it cuold be
regarded that the type of distance metric is left to the neural networks to
decide by itself.

The training time and inference time of our model is half that of siamese
networks because our model only takes one forward propagation.

##  IV Experiments

###  IV-A Experiments on MNIST

TABLE I: Experiment on digits 4 and 9 of MNIST.

|  | raw | flipped | salt pepper | salt pepper | salt pepper
---|---|---|---|---|---|---
|  | noise(0.2) | noise(0.5) | noise(0.9)
samples |  |  |  |  |  |  |  |  |  |  |
SSIM |  | 0.317 | 0.279 | 0.316 | 0.279 | 0.060 | 0.049 | 0.016 | 0.013 | 0.0001 | 0.0001
AUC | (ours) |  0.989(0.001) |  0.986(0.002) |  0.951(0.003) |  0.711(0.008) |  0.507(0.004)
(SNN) | 0.997(0.001) | 0.646(0.007) | 0.901(0.004) | 0.543(0.006) | 0.498(0.009)
| (LeNet) | 0.994(——-) | 0.725(——-) | 0.974(——-) | 0.820(——-) | 0.517(——-)
F1-score | (ours) |  0.971(0.002) |  0.971(0.003) |  0.895(0.004) |  0.708(0.009) |  0.669(0.006)
(SNN) | 0.983(0.001) | 0.687(0.007) | 0.837(0.005) | 0.666(0.008) | 0.665(0.008)
| (LeNet) | 0.993(——-) | 0.784(——-) | 0.961(——-) | 0.787(——-) | 0.673(——-)

|  | gaussian | gaussian | gaussian | style 1 | style 2
---|---|---|---|---|---|---
|  | noise(0.5) | noise(0.9) | noise(1.5)
samples |  |  |  |  |  |  |  |  |  |  |
SSIM |  | 0.140 | 0.114 | 0.053 | 0.039 | 0.021 | 0.016 | 0.167 | 0.142 | 0.060 | 0.046
AUC | (ours) |  0.988(0.001) |  0.954(0.003) |  0.897(0.006) |  0.984(0.002) |  0.973(0.002)
(SNN) | 0.993(0.001) | 0.875(0.003) | 0.701(0.006) | 0.593(0.007) | 0.544(0.008)
| (LeNet) | 0.994(——-) | 0.986(——-) | 0.971(——-) | 0.663(——-) | 0.694(——-)
F1-score | (ours) |  0.965(0.002) |  0.896(0.004) |  0.828(0.005) |  0.953(0.003) |  0.924(0.004)
(SNN) | 0.973(0.002) | 0.811(0.007) | 0.691(0.006) | 0.677(0.005) | 0.674(0.007)
| (LeNet) | 0.991(——-) | 0.970(——-) | 0.937(——-) | 0.749(——-) | 0.759(——-)

Note that the “salt pepper noise(0.2)” denotes the density of salt pepper
noise is 0.2.

The “gaussian noise(0.5)” denotes the variance of gaussian noise is 0.5. So do
others.

TABLE II: Experiments on ORL face datasets.

|  | raw | flipped | salt pepper | gaussian
---|---|---|---|---|---
|  | noise(0.1) | noise(50)
samples |  |  |  |  |  |  |  |  |
SSIM |  | 0.575 | 0.385 | 0.568 | 0.392 | 0.096 | 0.065 | 0.047 | 0.037
AUC | (ours) |  0.943(0.006) |  0.910(0.010) |  0.935(0.007) |  0.894(0.005)
(SNN) | 0.943(0.007) | 0.844(0.019) | 0.509(0.012) | 0.606(0.014)
F1-score | (ours) |  0.900(0.005) |  0.866(0.009) |  0.875(0.005) |  0.821(0.009)
(SNN) | 0.882(0.016) | 0.794(0.018) | 0.665(0.018) | 0.677(0.021)

TABLE III: Experiments on Omniglot datasets.

| raw | flipped | salt pepper | gaussian | style1 | style2 |
---|---|---|---|---|---|---|---
| noise(0.5) | noise(0.9) |
|  |  |  |  |  |  |
1-shot | 5-way | 20-way | 5-way | 20-way | 5-way | 20-way | 5-way | 20-way | 5-way | 20-way | 5-way | 20-way |
(ours) | 0.974 | 0.916 | 0.427 | 0.190 | 0.823 | 0.581 | 0.958 | 0.861 | 0.970 | 0.906 | 0.956 | 0.879 |
(0.006) | (0.014) | (0.028) | (0.021) | (0.015) | (0.017) | (0.006) | (0.018) | (0.007) | (0.016) | (0.011) | (0.014) |
(SNN) | 0.968 | 0.896 | 0.661 | 0.380 | 0.743 | 0.495 | 0.942 | 0.813 | 0.964 | 0.887 | 0.959 | 0.867 |
(0.006) | (0.018) | (0.028) | (0.027) | (0.023) | (0.030) | (0.010) | (0.021) | (0.012) | (0.015) | (0.010) | (0.014) |

Figure 5: The structure of MLP employed in our model and SNN.

The MNIST dataset [22] contains 70,000 samples of 10 patterns. Each sample is
a single channel image of $28*28$ with black background and white foreground.
Due to our attention on “absolute generalization”, we only use the digit 4 and
9 in our experiment. We train our model on the raw dataset and test the model
on some modified samples to valid the performance of our model. For
comparison, we employ siamese neutral networks (SNN) as a contrast.

Fairly, the same structure of MLP is employed in our model and SNN. As shown
in Figure. 5, the whole structure is employed in our model and the first 4
layers are employed in SNN as a subnetwork that shares weights. The image
samples are reshaped as vectors at the input layer of the network. The
variables’ dimension drops by half as they pass through a full connection
layer. Because that the output of Tanh is in block $[-1,1]$, we use Tanh as
activate layers according to 4.

In training phase, we train models with 100 epoches. For each epoch, 23582
pairs of samples are chosen randomly in the MNIST dataset with batch-size 256.
We use Adam optimizer with learning rate 0.001. In probe phase, besides raw
probe dataset of MNIST, some modified samples are produced with noise or
different styles based on the raw probe dataset of MNIST, which are regarded
as another dataset different from the MNIST dataset. As shown in Table. I, we
have 10 different probe datasets including raw data, flipped black and white,
adding salt-pepper noise with various noisy pixel densities, adding Gaussian
noise with various variances, adding various texture styles on background. We
use area under the curve (AUC) of the receiver operating characteristics (ROC)
and F1-scores to measure the classification performance, where F1-score is the
harmonic average of precision and recall. We operate each experiment 10 times
and get the mean and standard deviation. As references, we use average
Structural SIMilarity (SSIM) [25] to measure the similarity between pairs of
samples.

Besides, we use LeNet trained with digits 4 and 9 of raw training dataset to
compared with our model. Note that the intput of LeNet is one image, which is
different from SNN and ours. That is, the datasets LeNet used is different
from SNN and ours. Thus, the AUC and F1-socre of LeNet is just a reference.

As shown in Table. I, when using simple structure of MLP, SNN is awkward in
probe datasets adding salt-pepper noise and adding various texture styles on
background. However, our model is better at these probe dataset. The LeNet
does a good job on probe datasets adding noise. However, it has a poor
performance on “flliped”, “style1” and “style2”. Due to the input of our model
is a concatenated sample coupling two images, where one of them provides prior
knowledge when another is regarded as a probe sample, our model has better
performance.

###  IV-B Experiments for Face Identification

(a) SNN.

(b) Our model.

Figure 6: Structures of CNN in the experiment on ORL face dataset.

We conduct the experiment on ORL [26] faces Dataset. The dataset contains 40
patterns of faces with 10 images in each pattern. All images are stored in
grayscale with image size $92\times 112$. For each pattern of faces, the
images were captured at different times, under different lighting, with
different facial expressions (eyes open/closed, smiling/not smiling) and
facial details (with glasses/without glasses). All images were taken against a
dark, uniform background, with the front face (some slightly sideways).

Fairly, we employ the same convolution neutral networks in our model and SNN,
as shown in Figure. 6, the difference between two models is the input and
output of the network. Note that we use ReLU and Sigmoid as activate layers
rather than Tanh. Because that the distributions of concatenated samples are
complex when the patterns in a dataset is more than 2, we only use 0 and 1 to
denote the label of identical pattern samples and different pattern samples,
respectively.

In the experiment, we reshape all images to the size of $100\times 100$. In
training phase, we use 20 patterns of faces to train our model and SNN. We
train models with 100 epoches. For each epoch, 660 pairs of samples are chosen
randomly which are evenly split between the identical patterns sample pair and
the different patterns sample pair. In probe phase, we evaluate models on
probe datasets including the rest 20 patterns of faces. Similarly to the
Section IV-A, we produce some images as different datasets based on the raw
probe dataset.

As shown in Table. II, SNN has lower recognition rate for probe samples with
salt-pepper noise compared with our model. our model has better performance
than SNN in face identification.

###  IV-C Experiments on Omniglot for One-Shot Learning

The Omniglot dataset [27] is a classical dataset for one-shot learning, which
is collected by Brenden Lake and his collaborators. The dataset contains
handwritten character images from 50 alphabets ranging from well-established
international languages. All images are divided into a 40 alphabet background
set and a 10 alphabet evaluation set, which are used for training and probe
phase, respectively.

For fairness, we employ the similar structure in our model and SNN as
reference [9]. In training phase, no data augmentation is used. In probe
phase, we produce 5 datasets based on the raw probe dataset, including
“flipped”, adding salt-pepper noise with density 0.5, adding gaussian noise
with variance 0.9 and styles transformation.

As shown in Table. III, our model perform better than SNN on most probe
datasets. However, on the “flipped” dataset, our model perform worse.
Theoretically, the distribution of “flipped” dataset is a mirror of raw
dataset, which could be classified as accurate as raw dataset. However, in
Section IV-B and IV-C, the accuracy on the “flipped” dataset is far lower than
its on the raw dataset, which may be because that weights of CNN in our model
still tightly depend on the distribution of background.

##  V Conclusion

In practical applications, we always expect that a trained model could deal
with other similar classification task. One-shot learning gives a solution for
the multi-task need. However, most researchers focus on improving the
classification performance of model, few of them consider whether the datasets
they employed are fit for one-shot learning.

In this paper, we proposed the concept “absolute generalization” in order to
explain what kind of datasets were fit for one-shot learning. We believed that
a classifier with absolute generalizability can be obtained when the datasets
satisfied certain conditions. We proposed a method to build an absolutely
generalizable classifier. In the method, a new dataset was produced by
concatenating two samples of raw datasets. In the new dataset, we converted a
classification problem to an identity identification problem or a similarity
metric problem. The distribution of the new dataset hid a constant hyperplane
which supported an absolutely generalizable classifier.

Because open source datasets cannot satisfy our conditions, we produced some
artificial datasets based on open source datasets. However, these artificial
datasets had a great challenge and practical significance. Experiments showed
that the proposed method was superior to the baseline method, which confirmed
that our concerns did influence the baseline method.

However, we found that the proposed method performed poorly when combined with
CNN. So in the future, we will continue to study our method based on CNN.
Besides, we will try to concatenate samples in higher dimensions for few-shot
learning.

## References

  * [1] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” _Communications of the ACM_ , vol. 60, no. 6, pp. 84–90, 2017.
  * [2] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in _Proceedings of the IEEE conference on computer vision and pattern recognition_ , 2016, pp. 770–778.
  * [3] Q. Fan, W. Zhuo, C.-K. Tang, and Y.-W. Tai, “Few-shot object detection with attention-rpn and multi-relation detector,” in _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)_ , June 2020\.
  * [4] B. Kang, Z. Liu, X. Wang, F. Yu, J. Feng, and T. Darrell, “Few-shot object detection via feature reweighting,” in _Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)_ , October 2019.
  * [5] N. O’Mahony, S. Campbell, A. Carvalho, L. Krpalkova, G. V. Hernandez, S. Harapanahalli, D. Riordan, and J. Walsh, “One-shot learning for custom identification tasks; a review,” _Procedia Manufacturing_ , vol. 38, pp. 186–193, 2019.
  * [6] L. Fei-Fei, R. Fergus, and P. Perona, “One-shot learning of object categories,” _IEEE transactions on pattern analysis and machine intelligence_ , vol. 28, no. 4, pp. 594–611, 2006.
  * [7] L. Fe-Fei _et al._ , “A bayesian approach to unsupervised one-shot learning of object categories,” in _Proceedings Ninth IEEE International Conference on Computer Vision_. IEEE, 2003, pp. 1134–1141.
  * [8] F. Sung, Y. Yang, L. Zhang, T. Xiang, P. H. Torr, and T. M. Hospedales, “Learning to compare: Relation network for few-shot learning,” in _Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition_ , 2018, pp. 1199–1208.
  * [9] G. Koch, R. Zemel, and R. Salakhutdinov, “Siamese neural networks for one-shot image recognition,” in _ICML deep learning workshop_ , vol. 2. Lille, 2015.
  * [10] Y. Wang, Q. Yao, J. T. Kwok, and L. M. Ni, “Generalizing from a few examples: A survey on few-shot learning,” _ACM Computing Surveys (CSUR)_ , vol. 53, no. 3, pp. 1–34, 2020.
  * [11] S. Kadam and V. Vaidya, “Review and analysis of zero, one and few shot learning approaches,” in _Intelligent Systems Design and Applications_ , A. Abraham, A. K. Cherukuri, P. Melin, and N. Gandhi, Eds. Cham: Springer International Publishing, 2020, pp. 100–112.
  * [12] A. Santoro, S. Bartunov, M. Botvinick, D. Wierstra, and T. Lillicrap, “Meta-learning with memory-augmented neural networks,” in _International conference on machine learning_ , 2016, pp. 1842–1850.
  * [13] I. Ziko, J. Dolz, E. Granger, and I. B. Ayed, “Laplacian regularized few-shot learning,” in _International Conference on Machine Learning_. PMLR, 2020, pp. 11 660–11 670.
  * [14] Y. Zhang, H. Tang, and K. Jia, “Fine-grained visual categorization using meta-learning optimization with sample selection of auxiliary data,” in _Proceedings of the european conference on computer vision (ECCV)_ , 2018, pp. 233–248.
  * [15] S. Chopra, R. Hadsell, and Y. LeCun, “Learning a similarity metric discriminatively, with application to face verification,” in _2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05)_ , vol. 1. IEEE, 2005, pp. 539–546.
  * [16] O. Vinyals, C. Blundell, T. Lillicrap, D. Wierstra _et al._ , “Matching networks for one shot learning,” _Advances in neural information processing systems_ , vol. 29, pp. 3630–3638, 2016.
  * [17] E. Triantafillou, R. Zemel, and R. Urtasun, “Few-shot learning through an information retrieval lens,” in _Advances in Neural Information Processing Systems_ , 2017, pp. 2255–2265.
  * [18] K. Allen, E. Shelhamer, H. Shin, and J. Tenenbaum, “Infinite mixture prototypes for few-shot learning,” in _Proceedings of the 36th International Conference on Machine Learning_ , ser. Proceedings of Machine Learning Research, K. Chaudhuri and R. Salakhutdinov, Eds., vol. 97. Long Beach, California, USA: PMLR, 09–15 Jun 2019, pp. 232–241.
  * [19] C. Finn, P. Abbeel, and S. Levine, “Model-agnostic meta-learning for fast adaptation of deep networks,” _arXiv preprint arXiv:1703.03400_ , 2017.
  * [20] S. Caelles, K.-K. Maninis, J. Pont-Tuset, L. Leal-Taixé, D. Cremers, and L. Van Gool, “One-shot video object segmentation,” in _Proceedings of the IEEE conference on computer vision and pattern recognition_ , 2017, pp. 221–230.
  * [21] H. Pham, Q. Xie, Z. Dai, and Q. V. Le, “Meta pseudo labels,” _arXiv preprint arXiv:2003.10580_ , 2020.
  * [22] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” _Proceedings of the IEEE_ , vol. 86, no. 11, pp. 2278–2324, 1998.
  * [23] J. Bromley, J. W. Bentz, L. Bottou, I. Guyon, Y. LeCun, C. Moore, E. Säckinger, and R. Shah, “Signature verification using a “siamese” time delay neural network,” _International Journal of Pattern Recognition and Artificial Intelligence_ , vol. 7, no. 04, pp. 669–688, 1993.
  * [24] L. v. d. Maaten and G. Hinton, “Visualizing data using t-sne,” _Journal of machine learning research_ , vol. 9, no. Nov, pp. 2579–2605, 2008.
  * [25] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, “Image quality assessment: from error visibility to structural similarity,” _IEEE transactions on image processing_ , vol. 13, no. 4, pp. 600–612, 2004.
  * [26] F. S. Samaria and A. C. Harter, “Parameterisation of a stochastic model for human face identification,” in _Proceedings of 1994 IEEE workshop on applications of computer vision_. IEEE, 1994, pp. 138–142.
  * [27] B. Lake, R. Salakhutdinov, J. Gross, and J. Tenenbaum, “One shot learning of simple visual concepts,” in _Proceedings of the annual meeting of the cognitive science society_ , vol. 33, no. 33, 2011.