# Automated Optimal Layout Generator for Animal Shelters: A framework based on
Genetic Algorithm, TOPSIS and Graph Theory

Arghavan Jalayer
School of Architecture and Environmental Design,
Iran University of Science and Technology
Tehran, Tehran, Iran
<EMAIL_ADDRESS>
&Masoud Jalayer
Dipartimento di Ingegneria Gestionale,
Politecnico di Milano
Via Lambruschini 4/b, 20156, Milan, Italy
<EMAIL_ADDRESS>
&Mehdi Khakzand
School of Architecture and Environmental Design,
Iran University of Science and Technology
Tehran, Tehran, Iran
&Mohsen Faizi
School of Architecture and Environmental Design,
Iran University of Science and Technology
Tehran, Tehran, Iran

###### Abstract

Overpopulation in animal shelters contributes to increased disease spread and
higher expenses on animal healthcare, leading to fewer adoptions and more
shelter deaths. Additionally, one of the greatest challenges that shelters
face is the noise level in the dog kennel area, which is physically and
physiologically hazardous for both animals and staff. This paper proposes a
multi-criteria optimization framework to automatically design cage layouts
that maximize shelter capacity, minimize tension in the dog kennel area by
reducing the number of cages facing each other, and ensure accessibility for
staff and visitors. The proposed framework uses a Genetic Algorithm (GA) to
systematically generate and improve layouts. A novel graph theory-based
algorithm is introduced to process solutions and calculate fitness values.
Additionally, the Technique for Order of Preference by Similarity to Ideal
Solution (TOPSIS) is used to rank and sort the layouts in each iteration. The
graph-based algorithm calculates variables such as cage accessibility and
shortest paths to access points. Furthermore, a heuristic algorithm is
developed to calculate layout scores based on the number of cages facing each
other. This framework provides animal shelter management with a flexible
decision-support system that allows for different strategies by assigning
various weights to the TOPSIS criteria. Results from cats’ and dogs’ kennel
areas show that the proposed framework can suggest optimal layouts that
respect different priorities within acceptable runtimes.

_K_ eywords Automated Layout Generation $\cdot$ Genetic Algorithm $\cdot$
Multi-Criteria Decision-Making $\cdot$ Layout Optimization $\cdot$ Graph-based
Layout $\cdot$ Automatic Architectural Design

##  1 Introduction

Layout design is a critical decision-making phase in various fields, including
plant design [1], production planning [2], facility layout design [3],
building design [4], interior design [5], solar farm spatial panel
installation[6], and wind farm installation [7]. In animal shelters, an
effective cage layout design can enhance welfare by reducing noise levels [8]
and overcrowding [9]. Several measures have been proposed in the literature to
enhance the welfare of animal shelters, including accommodation design [10],
capacity for care [11], environmental enrichment [12], and social contact
[13]. However, optimizing cage layouts in animal shelters remains a gap in the
literature.

###  1.1 Computer-Aided Layout Design

Layout design involves decisions regarding the optimal spatial configuration
based on a set of constraints. This solution is highly dependent on the
application and the specific requirements of the problem. Numerous computer-
aided frameworks have been proposed to address layout design optimization in
different industries.

Derhami et al. ([14]) proposed a simulation-based algorithm to optimize block-
stocking in a warehouse layout, considering aisles, cross-aisles, and bay
depths to minimize material handling costs and maximize space utilization.
Kang et al. ([15]) addressed facility layout problems using a Cuckoo Search
algorithm and a random-key encoding scheme, finding near-optimal layouts for
machinery cells in flexible manufacturing systems. Dino ([16]) developed an
evolutionary framework named EASE for 3D architectural space layout, which
includes sub-heuristics to construct valid spatial layouts and a mathematical
model to check constraint satisfaction.

Genetic Algorithms (GA) have been successfully used in various layout design
problems. Islier ([17]) proposed a GA for facility layout design that
minimizes transportation load between departments, maximizes departmental
compactness and aligns requested and available areas. Wu et al. ([18]) used a
GA to design wind farms, optimizing for annual economic benefit considering
energy, land, and cable costs. [19] developed a hierarchical GA for cellular
manufacturing design, focusing on cell formation, group layout, and
scheduling. Luo et al. ([20]) designed a GA for layout optimization in green
logistic parks, aiming to maximize spatial utilization and minimize material
handling costs. Kumar and Cheng ([21]) employed a GA for site layout planning
in congested construction sites, utilizing Building Information Management to
reduce travel distances by 13% compared to traditional methods.

Multi-criteria decision-making (MCDM) approaches have also been used to
address layout planning, typically evaluating manually designed layouts.
Sharma and Singhal ([22]) proposed a fuzzy TOPSIS technique for facility
layout planning, evaluating criteria such as initial data requirements and
future expansion considerations. Murugesan et al. ([23]) used the Analytical
Hierarchy Process (AHP) to improve the operational performance of an India
National Sorting Hub, evaluating layouts based on personnel and material flow,
throughput time, space consumption, safety, comfort, and noise control.
Hervás-Peralta et al. ([24]) addressed layout design for terminals and ports
handling dangerous goods, using criteria like economic efficiency, capacity,
and safety, evaluated by a panel of experts using AHP.

###  1.2 Problems in Animal Shelters

Animal shelters face distinct problems such as overpopulation, hunger, lack of
space, high euthanasia rates, and seasonal fluctuations in animal intake [25,
11]. Optimal capacity for animal housing is crucial for successful shelter
management, directly impacting animal health and well-being. North American
shelters commonly house cats in barren, individual cages to reduce disease
spread, despite drawbacks identified in both individual and group housing [26,
27]. Factors such as expected length of stay (LOS), animal type, disease risk,
and cost influence housing decisions [10]. Inadequate housing capacity impedes
shelters’ ability to meet key goals, leading to high euthanasia rates [11].

High noise levels in shelters, often exceeding 119 dB, pose additional
challenges [8]. OSHA’s permissible noise exposure limit requires that workers
in environments with 115 dB noise levels be exposed for less than 15 minutes
to avoid hearing loss risks [28]. High noise levels negatively impact both
workers and animals, with dogs showing increased aggression and stress when
cages face each other [8]. Conversely, for felines, eye contact can reduce
stress and anxiety, with cats at eye level more likely to be adopted [29].

###  1.3 Objectives of This Study

This study aims to reduce noise levels in animal kennels and increase capacity
through a multi-criteria framework for optimal cage layouts. The framework
considers requested capacity, accessibility, and welfare, allowing shelter
management to prioritize different criteria with flexible weight assignments.
The objectives are:

Provide management with the flexibility to assign weights to prioritize
different criteria. Generate optimal layouts based on given weights,
priorities, and configurations with sufficiently fast runtimes. The remainder
of the paper is organized as follows: Section 2 presents the framework for
multi-criteria layout optimization, detailing related materials and operators,
criteria, and the graph-based algorithm used for calculation. Section 3
introduces the configuration of animal shelters and cage requirements and
depicts proposed solutions for different scenarios. Finally, conclusions and
opportunities for future studies are summarized in Section 4.

##  2 The Proposed Framework and Materials

This section presents the details of the proposed model designed to
automatically arrange cage layouts, optimizing space usage in animal shelters.
The space usage optimizer algorithm considers given space limitations and
optimizes multiple criteria simultaneously. The criteria are as follows:

  * •

Number of Accessible Cages (AC): The cages should be arranged in a layout that
meets standard requirements, providing maximum animal capacity.

  * •

Number of Inaccessible Cages (IC): The cages should be arranged so that no
cage resides in an inaccessible location.

  * •

The Longest Shortest-Path (LSP) and the Average of the Shortest-Paths (ASP):
To facilitate convenient movement within the shelter, this paper proposes a
graph-based shortest path solution, detailed in Section 2.2.4.

  * •

The Number of Cages Facing Each Other (CF): As mentioned in Section 1, dogs’
cages facing each other increase aggression and barking. Thus, reducing the
number of cages facing each other is crucial for minimizing shelter noise.

To optimize these criteria simultaneously, we employ a Multi-Criteria
Decision-Making (MCDM) solver technique, as described in Section 2.1.

Figure 1: The steps of the proposed framework.

The steps of the proposed animal shelter layout optimization framework are
illustrated in Figure 1.

###  2.1 TOPSIS Algorithm

Among the various Multi-Criteria Decision-Making (MCDM) techniques, the
"Technique for Order of Preference by Similarity to Ideal Solution" (TOPSIS)
is one of the most popular. Introduced in 1981 by Hwang and Yoon, TOPSIS
provides numerical solutions for MCDM problems, and it is preferred here due
to its fewer rank reversals compared to other techniques [30].

MCDM techniques are employed in various research fields, such as building
energy management, composite chemistry, agriculture, and financial management.
Recently, two related papers have utilized TOPSIS for designing building
construction layouts.

TOPSIS consists of seven steps, which are applied to our layout design problem
as follows:

  1. 1.

Generating the Decision Matrix $X$:

$X=\begin{bmatrix}x_{11}&\cdots&x_{1n}\\\ \vdots&\ddots&\vdots\\\
x_{m1}&\cdots&x_{mn}\end{bmatrix}$ (1)

  2. 2.

Normalizing the Decision Matrix $X\rightarrow R$:

$r_{ij}=\frac{x_{ij}}{\sqrt{\sum_{i=1}^{m}x_{ij}^{2}}}\quad\forall j$ (2)

  3. 3.

Determining the weighted normalized matrix $[t_{ij}]_{m\times n}=[w_{j}\cdot
r_{ij}]_{m\times n}$ representing the relative importance of each attribute.

  4. 4.

Calculating the Positive and Negative Ideal Solutions:

$t_{j}^{+}=\left\\{\begin{array}[]{ll}\max t_{ij}&\text{if }j\in J^{+}\\\ \min
t_{ij}&\text{if }j\in J^{-}\end{array}\right.,\quad
t_{j}^{-}=\left\\{\begin{array}[]{ll}\max t_{ij}&\text{if }j\in J^{-}\\\ \min
t_{ij}&\text{if }j\in J^{+}\end{array}\right.$ (3)

  5. 5.

Distance to Positive and Negative Ideal Solutions:

$S_{i}^{+}=\sqrt{\sum_{j=1}^{n}(t_{ij}-t_{j}^{+})^{2}},\quad
S_{i}^{-}=\sqrt{\sum_{j=1}^{n}(t_{ij}-t_{j}^{-})^{2}}$ (4)

  6. 6.

Relative Closeness to the Ideal Solution:
$C_{i}^{*}=\frac{S_{i}^{-}}{S_{i}^{-}+S_{i}^{+}}$

  7. 7.

Sorting the Proposed Layouts by $C_{i}^{*}$ Values in Descending Order

###  2.2 Genetic Algorithm (GA)

Introduced by Holland in 1974, Genetic Algorithms (GA) are evolutionary
computational approaches inspired by natural selection processes. GA concepts
include chromosomes, genes, mutation, and crossover offspring, designed to
address optimization problems where deterministic approaches are infeasible.
GA is a stochastic method, meaning its results rely on random or pseudo-random
variables and generators, and it is considered a heuristic due to the lack of
rigorous theoretical justification.

GA works by treating each solution as a chromosome, containing a set of genes
representing the solution’s parameters. It involves altering genes and
combining chromosomes to create new generations iteratively. A generation is
ranked by fitness values, and selected individuals generate offspring for the
next generation through mutation and crossover operations.

####  2.2.1 Creating the Initial Population

Given the complexity of the problem, regulations are defined to shrink the
search space. A "resolution" variable $r$ converts the shelter area $m\times
n$ square meters into matrix $A$:

$A=(a_{ij})\in\mathbb{N}^{x,y};\quad
x=\left\lceil\frac{m}{r}\right\rceil,\quad
y=\left\lceil\frac{n}{r}\right\rceil$ (5)

Cages can only have four orientations: upward, downward, rightward, and
leftward. The number of possible placements for a cage of length $l$ and width
$w$ in an area with no obstacles can be calculated as:

$n_{\text{poss}}=2(m-c_{\text{len}}-\left\lceil\frac{g}{r}\right\rceil+1)(n-c_{\text{wid}}+1)+2(m-c_{\text{wid}}+1)(n-c_{\text{len}}-\left\lceil\frac{g}{r}\right\rceil+1)$
(6)

where $c_{\text{wid}}=\frac{w}{r},\quad c_{\text{len}}=\frac{l}{r}$ and $g$ is
the required free space in front of the cage’s door. For a single cage with
$l=1.5$ and $w=0.75m$ in a $20mx20m$ area, and $g=2.5m$, there are 5148
possibilities with $r=0.5m$.

####  2.2.2 Placement Strategies

The algorithm randomly generates the layouts, considering the space
requirements to avoid obstructing the doors and the lanes. To this aim, an
algorithmic loop is created to place the cages one by one and employs one of
the pre-defined strategies to add a new cage to the area. The strategies to
place a new cage are described at Table 1.

Table 1: Different strategies to place a new cage Strategy name |  Description |  Example
---|---|---
Total Randomness |  It randomly places the new cage in a place with a random orientation while it complies with the space requirements. |  -
Confrontation |  An existing cage in front of which there is a vacant place for a new cage is selected. The algorithm places the new cage in front of the selected cage with the opposite orientation. |
Neighbourhood |  An existing cage which has sufficient vacant space in its adjacency is selected. The algorithm places the new cage beside the selected cage with the same orientation. |
Back-to-back |  An existing cage which has sufficient vacant space in its behind is selected. The algorithm places the new cage behind the selected cage with an opposite orientation. |
Aligned |  An existing cage which has sufficient vacant space in its behind is selected. The algorithm places the new cage behind the selected cage with the same orientation. |

The algorithm stochastically uses these five strategies to fill the shelter
with the desired number of cages. Figure 2 illustrates two different initial
chromosomes which consist of three string genes, $x$, $y$ and orientation for
a shelter area with 20 cages. Each column of the chromosomes represents a
cage’s placement. The first two arrays show the placement of the cage’s lower
left corner in matrix $A$, and the third array represents the orientation of
the cage in the shelter. Figure 3 depicts the corresponding layouts of these
two chromosomes in the shelter with dimensions of $10\times 12.5$ square
meters with three entrances.

Figure 2: Two initial chromosomes for a shelter with 20 cages. Figure 3: The
corresponding layouts of the two initial chromosomes.

####  2.2.3 Crossover and Mutation Operators

Crossover Operator: Designing the crossover operator is usually the hardest
part of developing a GA. Programming this operator is highly dependent on the
problem’s features and constraints and so often is done heuristically(Poon and
Carter 1995). Re After creating the initial population, with the
aforementioned steps. In this problem, each pair of crossover offspring is
made of a pair of randomly selected parents. In order to select the parents,
the paper uses a roulette wheel selection algorithm. Then, one of the two axes
will be randomly chosen to select a cutting point where each parent will be
split in two. Consequently, by swapping the parts, new offspring are created,
inheriting parts of their parent’s genes. Though, such exchanges can result in
nonpractical solutions since there might be cages in the newborn chromosomes
where the requirements are not passed or there are cages overlapping each
other. Our aim is to design a meticulous encoding schema and operators which
can safeguard the feasibility of the solutions; Thus, the algorithm checks the
cages, one by one. If there is any conflict, the corresponding algorithm wipes
out the cage and places a new cage in the layout using one of the five
placement strategies, randomly. Moreover, if there are fewer than required
cages in the newborn chromosome, the algorithm places new cages until it is
satisfied. Figure 4 illustrates how two chromosomes A and B, share their genes
to make two crossover offspring.

Figure 4: The crossover operation to create chromosomes AB and BA from parents
A and B.

Mutation Operator: Without a mutation operator GA tends to get stuck in a
local optimum point and misses the opportunity to have a wider search within
the solution space (Hesser and Männer 1990). Just like the crossover operator,
the mutation operator chooses its parents with a roulette wheel selection
algorithm. For each mutation offspring, unlike the crossover, the operator
only needs one parent. During the mutation process, the newborn offspring
inherits a random number of genes from the parent’s chromosome. Next, the
algorithm places the cages one by one, using five placement strategies until
the offspring’s chromosome gets complete (see Figure 5).

Figure 5: The mutation operation to create chromosomes AA from parent A.

####  2.2.4 Fitness Operator

The GA evaluates each chromosome’s quality based on four criteria: Number of
Accessible Cages (AC), Longest shortest path (LSP) to the entrance, Average of
Shortest-Paths (ASP) to the entrance, and Number of Cages Facing Each Other
(CF).

Shortest Paths Calculation As mentioned earlier, the convenience of access to
the cages is one of the attributes that determine the fitness of a layout.
This study assumes that the ideal solution has the lowest average value of
distances between the cages and the entrances. It also assumes that the ideal
solution has the lowest distance of the furthest cage to the entrance, which
is equal to the maximum of the shortest paths in each solution. This paper
proposes a heuristic approach to calculate the distance of a cage to the
entrance.

For each solution, we first consider the binary matrix of the area $A$
(Equation 5), containing all movement obstacles such as walls, columns, and
cages. An array $a_{ij}$ takes the value 1 only if there is no obstacle within
a radius of 0.5 meters. We consider a graph $G$ composed of $x\times y$ nodes:

$G=(V,E);\quad V=\\{v_{1,1},\ldots,v_{x,y}\\}$ (7)

where $V$ represents the set of nodes. If there are two adjacent arrays with
values equal to one, there is an edge between the corresponding nodes with a
weight of 1. The edge $e_{ij,kl}$ is calculated as follows:

$e_{ij,kl}=\left\\{\begin{array}[]{ll}1&\text{if }a_{ij}=a_{kl}=0\\\
0&\text{otherwise}\end{array}\right.\text{for}\quad|i-k|\times|j-l|=0\quad\text{and}\quad|i+j-k-l|=1$
(8)

Accordingly, there will be a network of connections between adjacent points in
the area where staff can move without any inconvenience. To find the shortest
path between two points in the area, the proposed framework uses the built-in
shortest-path algorithm in MATLAB R2019a.

Calculating Different Criteria- As mentioned above, some of the newborn
chromosomes may contain cages whose access paths are blocked by other cages or
obstacles. To find the number of accessible cages, the algorithm calculates
the shortest path to the entrances. If a cage has an empty solution, it means
that it’s an inaccessible cage.

The Longest Shortest-Path (LSP) and the Average of Shortest-Paths (ASP) are
the other two criteria that can be calculated using the shortest-path
algorithm. Figure 6 and 7 illustrate two pairs of layouts with the same ASP
and LSP values.

Figure 6: Two different layouts with the same ASP values. Figure 7: Two
different layouts with the same LSP values.

Calculating CF Values- To calculate the CF values, the algorithm takes each
cage, called the "first cage," and draws a vector from the first cage’s access
point to all other cages’ access points with different orientations. Vectors
not interrupted by any obstacle, including cage bodies, are considered eye-
contact vectors. Therefore, the CF value of a layout is calculated as:

$s_{ij}=\left\\{\begin{array}[]{ll}0&\text{if there is an obstacle between
}i\text{ and }j\\\ 1&\text{otherwise}\end{array}\right.$ (9)

$CF=\sum_{j=1}^{N}\sum_{i=1,i\neq j}^{N}\frac{s_{ij}}{l_{ij}}$ (10)

where $l_{ij}$ denotes the length of an eye-contact vector between cages $i$
and $j$. $N$ represents the number of cages

##  3 Results and Discussion

###  3.1 Specifications of the Case

To demonstrate the practicality of the framework, the model was implemented on
an animal care center planned to be located on Kharrazi Expressway, Tehran,
Iran. The complex consists of four separate rectangular shelters: three for
cats and a more spacious one for dogs, located approximately 50 meters apart
from the cat shelters. Figure 8 illustrates a perspective view of the animal
care center, and Table 2 provides the specifications of the shelters.

Table 2: Specifications of the shelters ID | Animal | Length | Width | # Doors
---|---|---|---|---
A | Cats | 25 m | 20 m | 2
B | Cats | 30 m | 20 m | 3
C | Cats | 30 m | 20 m | 3
D | Dogs | 81.2 m | 36.4 m | 6
Figure 8: The perspective of the animal care center.

According to the HSUS guidelines (The Humane Society of the United States,
1999), an individual dog cage should have a kennel section of 1.2m by 1.8m and
a run section of 1.2m by 2.4m, allowing the dog to engage in daily training
activities. Therefore, this paper considers dog cages with dimensions of
$1.4m$ by $4.2m$, compatible with a resolution of $r=1.4m$. For cats, the HSUS
guidelines suggest individual cages of $0.91m$ by $0.91m$. For simplicity,
this paper uses a resolution of $r=1.0m$ for the cat shelters.

###  3.2 Optimization Results

For these optimizations, this study employs a personal laptop with an Intel®
i7 processor, 8GB of memory, and a Windows 11 operating system. The framework
is fully coded in MATLAB R2020a.

Figure 9: Near-optimum solutions found for shelter D for the first scenario
(right), and the second scenario (left).

The optimization process involves generating and evaluating various cage
layout configurations to find the optimal arrangement that maximizes space
utilization, minimizes noise levels, and ensures accessibility. The results
demonstrate the effectiveness of the proposed framework in designing practical
and efficient layouts for animal shelters. The optimized layouts respect the
constraints and guidelines, providing improved living conditions for the
animals and facilitating easier management for the staff.

To optimize the cage layouts of shelter D, a combination of
strategies—“randomness,” “neighborhood,” “back-to-back,” and “aligned”—were
used with weights of 5%, 35%, 30%, and 30%, respectively. The “opponent”
strategy was not used since it is less preferable for management to have dogs
facing each other. It should be noted that the other strategies can still
result in a new cage facing a pre-located cage.

For these GA searches, after a grid search, the population size was set to 24,
with an equal share of 12 crossover and mutation children. In each iteration,
the better 50% of the population were kept for the next generation, while the
rest of the chromosomes were wiped out.

The paper defines two scenarios for the management system to follow:

  * •

Scenario I: The management aims to maintain the welfare of the shelter, opting
for fewer dogs to achieve higher welfare.

  * •

Scenario II: The management tries to admit more dogs, prioritizing capacity.

For Scenario I, the weights were set to +44% for AC, -4% for LSP and ASP, -44%
for CF, and -4% for minimizing the number of inaccessible cages (IC). The
search configuration emphasized finding a layout with lower CF and higher AC,
while assigning less priority to the other attributes. As shown in Table 3,
chromosome ‘a4474’ had the best fitness among the population in the 40th
iteration and was selected as the near-optimum solution. The final ranking
shows that only a few confrontations occur in the near-optimal solution,
‘a4474,’ which managed to place 253 accessible cages in the shelter without
any inaccessible ones.

Table 4 shows the results of iteration 50 for Scenario II, where the main aim
was to find a layout with higher AC importance. Consequently, ‘a32320’ had a
high CF value of about 710, indicating many dogs could see each other, but it
was still selected as the best layout. This compromise allowed for a higher
number of dogs placed inside the kennels. Under these conditions, ‘a4474,’
which ranked first in the previous search, could not achieve better than the
6th place in the TOPSIS table. The proposed solutions for these two scenarios
are depicted in Figure 9.

Table 3: TOPSIS Scores for the Dogs’ Shelter in Iteration Number 50, Scenario I ID \Weight | AC | LSP | ASP | CF | IC | Score
---|---|---|---|---|---|---
44% | -4% | -4% | -44% | -4%
a4474 | 253 | 66 | 32.609 | 0.4511 | 0 | 1
a04184 | 250 | 65 | 32.564 | 20.721 | 7 | 0.9844
a03297 | 246 | 65 | 32.325 | 0 | 0 | 0.9837
a05265 | 203 | 64 | 31.158 | 0 | 19 | 0.8883
a02721 | 203 | 64 | 31.158 | 0 | 19 | 0.8883
a02533 | 164 | 64 | 32.421 | 0 | 30 | 0.8163
a04137 | 164 | 64 | 32.421 | 0 | 30 | 0.8163
a05642 | 164 | 64 | 32.421 | 0 | 30 | 0.8163
a03338 | 220 | 64 | 30.568 | 226.18 | 38 | 0.7455
a04295 | 241 | 67 | 30.278 | 332.88 | 23 | 0.6507
a28928 | 252 | 81 | 38.393 | 372.71 | 15 | 0.6152
a03144 | 148 | 72 | 34.453 | 379.8 | 60 | 0.5268
a03134 | 184 | 71 | 34.011 | 454.66 | 60 | 0.4740
a02756 | 206 | 67 | 33.238 | 511.46 | 36 | 0.4328
a04189 | 209 | 65 | 32.746 | 528.95 | 37 | 0.4163
a05214 | 207 | 65 | 32.488 | 584.17 | 37 | 0.3567
a11768 | 263 | 65 | 31.954 | 700.63 | 0 | 0.3248
a32320 | 266 | 76 | 34.808 | 710.4 | 0 | 0.3218
a29798 | 259 | 65 | 31.946 | 696.74 | 4 | 0.3213
a1461 | 259 | 65 | 31.946 | 696.74 | 4 | 0.3213
a04798 | 260 | 76 | 35.831 | 739.19 | 5 | 0.2941
a04752 | 257 | 76 | 35.638 | 785.49 | 4 | 0.2652
a05447 | 239 | 67 | 33.669 | 748.3 | 26 | 0.2516
a02699 | 235 | 64 | 32.157 | 871.17 | 26 | 0.1926
Table 4: TOPSIS Scores for the Dogs’ Shelter in Iteration Number 50, Scenario II ID \Weight | AC | LSP | ASP | CF | IC | Score
---|---|---|---|---|---|---
90% | -2% | -2% | -3% | -3%
a32320 | 266 | 76 | 34.808 | 710.4 | 0 | 1
a11768 | 263 | 65 | 31.954 | 700.63 | 0 | 0.99331
a36133 | 258 | 76 | 34.841 | 536.4 | 3 | 0.98082
a29798 | 259 | 65 | 31.946 | 696.74 | 4 | 0.96772
a1461 | 259 | 65 | 31.946 | 696.74 | 4 | 0.96772
a4474 | 253 | 66 | 32.609 | 0.4511 | 0 | 0.95701
a40942 | 253 | 70 | 32.996 | 4.124 | 5 | 0.956
a28928 | 252 | 83 | 39.183 | 403.16 | 12 | 0.92061
a22612 | 245 | 70 | 33.735 | 190.53 | 16 | 0.83716
a26730 | 238 | 65 | 33.038 | 679.52 | 24 | 0.71828
a17587 | 233 | 66 | 32.438 | 75.604 | 23 | 0.67173
a32612 | 233 | 76 | 34.142 | 190.53 | 26 | 0.66719
a2379 | 232 | 69 | 30.897 | 715.74 | 20 | 0.63884
a33201 | 229 | 76 | 36.856 | 401.57 | 27 | 0.60529
a3960 | 228 | 76 | 35.478 | 243.53 | 18 | 0.60033
a37430 | 222 | 76 | 37.306 | 368.96 | 31 | 0.50824
a35480 | 216 | 68 | 34.403 | 87.851 | 34 | 0.43616
a27496 | 208 | 65 | 33.255 | 187.13 | 44 | 0.32134
a25805 | 207 | 67 | 33.976 | 135.77 | 45 | 0.31099
a20930 | 206 | 68 | 34.578 | 114.22 | 46 | 0.29922
a7190 | 204 | 68 | 34.853 | 0 | 48 | 0.28288
a14146 | 200 | 67 | 34.89 | 274.36 | 55 | 0.20798
a12375 | 191 | 67 | 33.188 | 270.91 | 62 | 0.1116
a15585 | 187 | 77 | 35.497 | 207.22 | 66 | 0.10329
Figure 10: The GA performance at each iteration.

Figure 10 illustrates the performance of the GA during the search for the best
layout of Shelter D in the second scenario. The best, average, and median AC
values for each iteration are depicted. It can be inferred that the population
converges rapidly. With the mentioned configuration, the optimization runtime
takes approximately 2 hours for each search.

As previously mentioned, the confrontation of cats’ cages does not negatively
impact their welfare. Thus, to find the best layout, the “opponent” strategy
is also implemented alongside other strategies for placing new cages in the
three cat shelters (A, B, and C). Figures 11 and 12 show the optimum solutions
for the different cat shelters. According to the solutions, at each cage
level, the animal care center can accommodate 257 accessible cages (AC) for
the more spacious shelters B and C, and 212 AC for shelter A. The runtime
performance information is provided in Table 5.

Table 5: Runtime performances of the GA searches for each shelter Shelter | Scenario | Runtime | # Iteration | Resolution | # AC
---|---|---|---|---|---
A | - | 21 mins | 200 | 1 m | 212
B / C | - | 26 mins | 200 | 1 m | 257
D | I | 119 mins | 100 | 1.4 m | 253
D | II | 140 mins | 100 | 1.4 m | 266
Figure 11: A near-optimum solution found for shelter B and C. Figure 12: A
near-optimum solution found for shelter A.

These results demonstrate the efficiency and effectiveness of the proposed
framework in optimizing the cage layouts for different shelters under various
scenarios. The rapid convergence of the GA and the practical runtime
performances highlight the applicability of this approach in real-world
settings.

##  4 Conclusion and Future Opportunities

Overpopulation and high noise levels are among the most critical issues
adversely affecting the welfare of animal shelters. While numerous studies
have proposed various measures and solutions to improve shelter environments,
cage layout optimization has not been sufficiently addressed. To fill this
gap, this study devises a multi-criteria layout optimization framework to
generate optimal layouts based on management priorities.

This framework provides shelter management with a decision-making tool to
systematically reduce overcrowding and tension in dog kennels while
considering aisles and accessibilities. The study develops a graph-based
algorithm to calculate the accessibility of the cages and the shortest paths
to access points. Additionally, a heuristic algorithm analyzes the intensity
of animal confrontations in the kennels. A TOPSIS technique is employed within
a Genetic Algorithm (GA) to rank the stochastically proposed layouts at each
iteration.

The results from three cats’ kennel areas and two dogs’ kennel areas
demonstrate the framework’s practicability. The MCDM characteristics of the
framework make it adjustable to find solutions for different scenarios and
requested capacities. The paper applies the framework to optimally place cages
inside four shelters for cats and dogs in an animal care center plan,
demonstrating the feasibility of the framework to find solutions within
relatively short runtimes.

Several research opportunities and working directions are identified and
recommended as follows: (1) Proposing more criteria for the layout evaluation
phase to make the layouts compatible with some specific desires. (2) Employing
different cage sizes inside each kennel area. (3) Considering training areas
and human-animal interaction areas inside the layouts.

## References

  * [1] J Guo, N Zhao, L Sun, and S Zhang.  Modular based flexible digital twin for factory design.  Journal of Ambient Intelligence and Humanized Computing, 10:1189–1200, 2019.
  * [2] Z Zhang, X Wang, X Wang, et al.  A simulation-based approach for plant layout design and production planning.  Journal of Ambient Intelligence and Humanized Computing, 10:1217–1230, 2019.
  * [3] S Masoud, BDB Chowdhury, YJ Son, et al.  Simulation based optimization of resource allocation and facility layout for vegetable grafting operations.  Computers and Electronics in Agriculture, 163:104845, 2019.
  * [4] J Wang, X Wang, W Shou, et al.  Building information modeling-based integration of mep layout designs and constructability.  Automation in Construction, 61:134–146, 2016.
  * [5] T Matsuno, Y Hatanaka, W Sunayama, and K Ogohara.  Furniture layout design aided system using subjective reward.  In PY Lau, K Hayase, Q Kemao, et al., editors, International Workshop on Advanced Image Technology (IWAIT) 2019, page 97. SPIE, 2019.
  * [6] Q Zhong and D Tong.  Spatial layout optimization for solar photovoltaic (pv) panel installation.  Renewable Energy, 150:1–11, 2020.
  * [7] G Gualtieri.  A novel method for wind farm layout optimization based on wind turbine selection.  Energy Conversion and Management, 193:106–123, 2019.
  * [8] CL Coppola, RM Enns, and T Grandin.  Noise in the animal shelter environment: Building design and the effects of daily noise exposure.  Journal of Applied Animal Welfare Science, 9:1–7, 2010.
  * [9] E Doyle, M Gupta, M Spindel, et al.  Impact of the timing of spay-neuter related to transport on disease rates in relocated dogs.  Animals, 10:1–12, 2020.
  * [10] D Wagner, K Hurley, and J Stavisky.  Shelter housing for cats: Practical aspects of design and construction, and adaptation of existing accommodation.  Journal of Feline Medicine and Surgery, 20:643–652, 2018.
  * [11] CL Karsten, DC Wagner, PH Kass, and KF Hurley.  An observational study of the relationship between capacity for care as an animal shelter management model and cat health, adoption and death in three animal shelters.  The Veterinary Journal, 227:15–22, 2017.
  * [12] PJ Perry, JM Scarlett, KA Houpt, and HN Erb.  A comparison of four environmental enrichments on adoptability of shelter dogs.  Journal of Veterinary Behavior, 35:1–7, 2020.
  * [13] ES Dudley, PA Schiml, and MB Hennessy.  Effects of repeated petting sessions on leukocyte counts, intestinal parasite prevalence, and plasma cortisol concentration of dogs housed in a county animal shelter.  Journal of the American Veterinary Medical Association, 247:1289–1298, 2015.
  * [14] S Derhami, JS Smith, and KR Gue.  A simulation-based optimization approach to design optimal layouts for block stacking warehouses.  International Journal of Production Economics, 223, 2020.
  * [15] S Kang, M Kim, and J Chae.  A closed loop based facility layout design using a cuckoo search algorithm.  Expert Systems with Applications, 93:322–335, 2018.
  * [16] IG Dino.  An evolutionary approach for 3d architectural space layout design exploration.  Automation in Construction, 69:131–150, 2016.
  * [17] AA Islier.  A genetic algorithm approach for multiple criteria facility layout design.  International Journal of Production Research, 36:1549–1569, 1998.
  * [18] Y Wu, S Zhang, R Wang, et al.  A design methodology for wind farm layout considering cable routing and economic benefit based on genetic algorithm and geosteiner.  Renewable Energy, 146:687–698, 2020.
  * [19] X Wu, CH Chu, Y Wang, and W Yan.  A genetic algorithm for cellular manufacturing design and layout.  European Journal of Operational Research, 181:156–167, 2007.
  * [20] Q Luo, J Zhu, H Jia, and Y Xu.  A two-stage layout method for functional areas in logistics park.  Advances in Mechanical Engineering, 11:1–17, 2019.
  * [21] SS Kumar and JCP Cheng.  A bim-based automated site layout planning framework for congested construction sites.  Automation in Construction, 59:24–37, 2015.
  * [22] P Sharma and S Singhal.  Implementation of fuzzy topsis methodology in selection of procedural approach for facility layout planning.  International Journal of Advanced Manufacturing Technology, 88:1485–1486, 2017.
  * [23] V Sengazhani Murugesan, AH Sequeira, DS Shetty, and SK Jauhar.  Enhancement of mail operational performance of india post facility layout using ahp.  International Journal of System Assurance Engineering and Management, 11:261–273, 2020.
  * [24] M Hervás-Peralta, S Poveda-Reyes, FE Santarremigia, and GD Molero.  Designing the layout of terminals with dangerous goods for safer and more secure ports and hinterlands.  Case Studies on Transport Policy, 2020.
  * [25] AC Olmez and E Karaarslan.  Blockchain based trusted adoption and fostering system proposal for turkish animal shelters.  In 1st International Informatics and Software Engineering Conference (Innovations and Technology for Digital Transformation) IISEC 2019 - Proceedings. IEEE, 2019.
  * [26] DS Ottway and DM Hawkins.  Cat housing in rescue shelters: a welfare comparison between communal and discrete-unit housing.  Animal Welfare, 12:173–189, 2003.
  * [27] N Gourkow and D Fraser.  The effect of housing and handling practices on the welfare, behaviour and selection of domestic cats (felis sylvestris catus) by adopters in an animal shelter.  Animal Welfare, 15:371–377, 2006.
  * [28] Occupational Safety and Health Administration.  Occupational noise exposure.  https://www.osha.gov/laws-regs/regulations/standardnumber/1910/1910.95.  Accessed: 2020-06-05.
  * [29] N Janke, O Berke, T Flockhart, et al.  Risk factors affecting length of stay of cats in an animal shelter: A case study at the guelph humane society, 2011–2016.  Preventive Veterinary Medicine, 148:44–48, 2017.
  * [30] Eric Afful-Dadzie, Stephen Nabareseh, Anthony Afful-Dadzie, and Zuzana Komínková Oplatková.  A fuzzy topsis framework for selecting fragile states for support facility.  Quality & Quantity, 49:1835–1855, 2015.


#  ReasTAP: Injecting Table Reasoning Skills During Pre-training
via Synthetic Reasoning Examples

Yilun Zhao1 Linyong Nan1 Zhenting Qi2 Rui Zhang3 Dragomir Radev1
1Yale University 2 Zhejiang University 3Penn State University
{yilun.zhao<EMAIL_ADDRESS>
###### Abstract

Reasoning over tabular data requires both table structure understanding and a
broad set of table reasoning skills. Current models with table-specific
architectures and pre-training methods perform well on understanding table
structures, but they still struggle with tasks that require various table
reasoning skills. In this work, we develop ReasTAP to show that high-level
table reasoning skills can be injected into models during pre-training without
a complex table-specific architecture design. We define 7 table reasoning
skills, such as numerical operation, temporal comparison, and conjunction.
Each reasoning skill is associated with one example generator, which
synthesizes questions over semi-structured tables according to the sampled
templates. We model the table pre-training task as a sequence generation task
and pre-train ReasTAP to generate precise answers to the synthetic examples.
ReasTAP is evaluated on four benchmarks covering three downstream tasks
including: 1) WikiSQL-Weak and WikiTQ for Table Question Answering; 2) TabFact
for Table Fact Verification; and 3) LogicNLG for Faithful Table-to-Text
Generation. Experimental results demonstrate that ReasTAP achieves new state-
of-the-art performance on all benchmarks and delivers a significant
improvement on low-resource setting. Our code is publicly available at
https://github.com/Yale-LILY/ReasTAP.

##  1 Introduction

Figure 1: The illustration of ReasTAP pre-training. The tables are crawled
from Wikipedia. During pre-processing, we perturb the table row order to
alleviate unwanted bias brought by table encoding. The colored cells are
relevant facts necessary to answer the given question. Each color corresponds
to a different table reasoning skill. And each reasoning skill corresponds to
an example generator, which synthesizes QA pairs over tables according to the
sampled templates. We model the pre-training task as a sequence generation
task and pre-train ReasTAP to generate correct answers given the flatten table
and synthetic question.

Inspired by the massive success of pre-trained language models (LM) on free-
form natural language (NL) tasks Devlin et al. (2019); Dong et al. (2019);
Raffel et al. (2020); Lewis et al. (2020), researchers have attempted to
extend the pre-training to table data. Tables are a valuable form of data that
organize information in a structured way. They often contain data that is
organized in a more accessible manner than in unstructured texts. To adapt the
pre-training paradigm on structured tabular data, previous works mainly focus
on designing models with table-specific architectures and pre-training
methods. This includes introducing a structure-aware attention mechanism Yin
et al. (2020); Deng et al. (2020); Zayats et al. (2021), adding auxiliary
structure indicative embeddings Herzig et al. (2020); Eisenschlos et al.
(2020); Wang et al. (2021b), and designing table-specific pre-training
objectives Yin et al. (2020); Yu et al. (2021a); Wang et al. (2021b); Liu et
al. (2022b, a). While these methods are effective in understanding table
structures, they increase the modeling complexity and lack interpretability on
why models learns table reasoning skills during pre-training.

This paper presents a new table pre-training approach, named ReasTAP, which
enables a model to efficiently learn table structure understanding and table
reasoning skills during pre-training. We first defined 7 table reasoning
skills, such as numerical operation and temporal comparison. As shown in
Figure 1, for each reasoning skill, a corresponding example generator was
applied to synthesize Question Answering (QA) examples over tables. We modeled
the pre-training task as a sequence generation task and pre-trained a
sequence-to-sequence (seq2seq) LM to generate the answer to the synthetic
questions. ReasTAP is theoretically applicable to any seq2seq LM without a
table-specific architecture design. Our key insight is that if a language
model can be pre-trained to generate the answers to synthetic questions, which
require various table reasoning skills, it should have a great table structure
understanding and table reasoning capacity, thereby conferring benefits to
downstream tasks. The main contributions of our work can be summarized as
follows:

  * •

We develop a new table reasoning example generation pipeline, which produces a
large-scale table QA corpus that requires various reasoning skills over semi-
structured tables.

  * •

We propose a new table pre-training method, ReasTAP, which helps the model to
learn table structure understanding and various table reasoning skills during
pre-training without any table-specific architecture design.

  * •

ReasTAP is evaluated on four downstream benchmarks. Experimental results
demonstrate that ReasTAP achieves new state-of-the-art results on all of them,
and delivers a great improvement on low-resource setting.

##  2 Pre-training Corpus

Reasoning |  Example Templates |  Example Questions & Answers | %Data
---|---|---|---
Conjunction |  What was the col:1 when the col:2 was CONDITION:2 and the col:3 was CONDITION:3? |  Q: What was the Television Service when the Country was Italy and the Content was Sport?
A: Sky OMC Sports, ESPN, Gazzetta TV, … | 21.6%
Quantifiers Only/Every |  Does OPERATOR col:1, with col:2 was CONDTION:2, have col:3 CONDITION:3? |  Q: Does every Company, with Headquarter was Paris, have Industry Financials?
A: Yes
Q: Does only Company Name, with Founded Year was later than 1964, have
Employee Number greater than 30,000?
A: No | 10.3%
Temporal
Comparison |  Which col:1, with col:2 was CONDITION:2, happened the ORDINAL according to col:3? |  Q: Which Romaji, with Sales was greater than 203,471, happened the 4th according to Date?
A: Hepburn | 14.5%
Date
Difference |  how much time had passed between when the col:1 was val:1 and when the col:2 was val:2? |  Q: how much time had passed between when the Candidate was John Kufuor and when the Candidate was Paul McCartney?
A: 16 years | 5.7%
Counting |  How many col:1 have col:2 CONDITION:2? |  Q: How many Event Location have Attendance greater than 10,235?
A: 7 | 18.0%
Numerical
Operation |  What was the OPERATOR of col:1 when the col:2 was CONDITION:2? |  Q: What was the sum of GDP Estimate ($ US Million) when the GDP Estimate ($ US Million) was greater than 841,969?
A: 1,574,013 | 15.9%
Numerical
Comparison |  Which col:1, with col:2 was CONDITION:2, has the ORDINAL col:3? |  Q: Which Franchise, with Owner(s) was Nintendo, has the 5th Total revenue($ US Billion)?
A: Pokemon | 14.0%
Table 1: 7 reasoning skills with example for pre-training ReasTAP. Variable
names indicate permissible instantiations. col denotes a column name, val
denotes a cell value, and indices denote that a cell value must originate from
the specified column. OPERATOR and ORDINAL correspond to operators and ordinal
numeral that are instantiated according to the specific reasoning skill, e.g.,
for ‘Temporal Comparison’, ORDINAL is replaced with a reasonable ordinal
numeral such as "4th". And CONDITION:i can be 1) a cell value from the i-th
column, or 2) number/temporal comparison statement (e.g. "later than 1967") if
the i-th column is of number or date type.

###  2.1 Table Source and Pre-processing

We chose publicly available semi-structured tables as the table source.
Specifically, we extracted tables from English Wikipedia111We parsed the
02-20-2022 Wikipedia dump using WikiExtractor Tools from
https://github.com/attardi/wikiextractor, which covered a wide range of
domains including popular culture, geography, politics, and science. We kept
tables with 8-30 rows and at least three columns, resulting in around 600K
tables. For each extracted table, a pre-processing script was applied to
automatically annotate table columns with their data types (i.e, string,
number, and date), which allows us to generate questions that involve
manipulating numbers and dates. Furthermore, recent work Yang et al. (2022);
Wang et al. (2022) demonstrates that existing table pre-training approaches
might encode table row order as an unwanted bias. For example, the pre-trained
model being aware of row order information is inclined to select the first or
last row of tables when answering superlative-type questions without truly
understanding the table content. To alleviate this problem, we randomly
shuffled table rows during pre-processing.

###  2.2 Example Generation

We defined 7 types of table reasoning skills, with examples and explanations
shown in Table 1. The example generation pipeline was adapted from Yoran et
al. (2021). Each reasoning skill is associated with one example generator and
several question templates. The example generator was implemented as a
function that takes a table $T$ and generates several reasoning examples ($T$,
$\bm{q}$, $\bm{a}$) according to the template, where $\bm{q}$ denotes the
question, and $\bm{a}$ denotes the answer.

Each template contains typed variables that are instantiated with content from
the extracted table. Specifically, column col and cell value val are indexed
to specify that val:i must be instantiated by a cell value from the i-th
column. Some templates also regulate that the selected column and cell value
must be date or number type. OPERATOR and ORDINAL correspond to operators and
ordinal numerals that are instantiated according to the specific reasoning
skill. And CONDITION:i can be 1) a cell value from the i-th column; or 2) a
number/temporal comparison statement if the i-th column is date or number
type. For example, the question from Figure 1 "Which Company Name, with
Headquarter was United States, has the 4th Profit?" are generated from one of
the "Numerical Comparison" templates: "Which col:1, with col:2 was
CONDITION:2, has the ORDINAL col:3?"

Once all variables in the sampled template were instantiated, we obtained
question $\bm{q}$. Then the example generator would programmatically return
the corresponding answer $\bm{a}$.

###  2.3 Example Sampling

After generating a vast number of QA examples for each reasoning skill, we had
to sample pre-training data from these synthetic examples. In our setting, the
portion of pre-training examples (Table 1) corresponding to each reasoning
skill roughly matches the portion of logical operations defined in TabFact
Chen et al. (2020b). We raised the portion of numerical operation skill as
numerical reasoning is more challenging for models to learn. To increase the
diversity of pre-training corpus, for each reasoning skill, we also sampled
{SQL query, execution result} pairs from TAPEX Liu et al. (2022b) pre-training
corpus as complementary QA examples. The sampled pairs were categorised
according to their function (e.g., COUNT, SUM). As a result, we obtained a
total of 4M pairs of reasoning examples as the pre-training corpus for
ReasTAP.

##  3 Pre-training ReasTAP

#### Task Formulation

Each example in the synthetic pre-training corpus contains a question $\bm{q}$
and a semi-structured table $T$ as the model input. The task objective is to
generate an accurate answer string $\bm{a}=(a_{1},a_{2},\dots,a_{n})$ given
the question $\bm{q}$ and input table $T$:

$\bm{a}=\mathrm{argmax}\prod_{i=1}^{n}P(a_{i}|a_{<i},\bm{q},T;\theta),$ (1)

where $\theta$ denotes the parameters of a seq2seq LM.

#### Model Architecture

Our method is theoretically applicable to any seq2seq LM, such as T5 Raffel et
al. (2020) and GPT3 Brown et al. (2020). In our experiments, we implemented
ReasTAP based on BART Lewis et al. (2020), a widely used Transformer-based
pre-trained model Vaswani et al. (2017) that has proved its effectiveness on
various comprehension and text generation tasks. In our experiments, we chose
BART-Large as a backbone, which has around 400M parameters and 12 layers in
both encoder and decoder.

#### Data Serialization

As illustrated in Figure 1, the input contains a question and its
corresponding table. We flattened the table so that it can be fed directly
into the encore-decoder model. Specifically, by inserting several special
tokens to indicate the table boundaries, a flattened table is denoted as

$\displaystyle T=$
$\displaystyle\texttt{[HEAD]}h_{1}~{}|~{}h_{2}~{}|~{}{\cdots}~{}|~{}h_{m}$
$\displaystyle\texttt{[ROW]}~{}~{}c_{1,1}~{}|~{}c_{1,2}~{}|~{}{\cdots}~{}|~{}c_{1,m}$
$\displaystyle\cdots$
$\displaystyle\texttt{[ROW]}~{}~{}c_{n,1}~{}|~{}c_{n,2}~{}|~{}{\cdots}~{}|~{}c_{n,m}$

where [HEAD] and [ROW] are special tokens indicating the region of table
headers and rows respectively. We prefixed the flattened table $T$ with the
question and feed them into the model encoder. The decoder is tasked to
generate the answer(s), separated by commas, autoregressively.

Task |  Dataset | # Examples | # Tables | Input | Output
---|---|---|---|---|---
Question Answering |  WikiSQL-Weak Zhong et al. (2017) | 80,654 | 24,241 | Question | Answer
WikiTQ Pasupat and Liang (2015) | 22,033 | 2,108 | Question | Answer
Fact Verification |  TabFact Chen et al. (2020b) | 118,275 | 16,573 | Statement | Boolean
Faithful Text Generation |  LogicNLG Chen et al. (2020a) | 37,015 | 7,392 | Columns | Text
Table 2: Overview of downstream tasks used in this paper.

##  4 Downstream Tasks

We evaluated ReasTAP on three different types of downstream tasks to verify
its effectiveness. The statistics and examples for each task are shown in
Table 2, and Table 10 in the Appendix, respectively. The fine-tuning of
ReasTAP is similar to the procedure for pre-training discussed in section 3.
We modeled both downstream tasks as sequence generation tasks and leverage
generative LMs to generate the output autoregressively.

#### Table QA

WikiSQL-Weak Zhong et al. (2017) and WikiTQ Pasupat and Liang (2015) were used
to evaluate ReasTAP performance on Table QA tasks. WikiSQL-Weak Zhong et al.
(2017) requires the models to perform filtering and optional aggregation on
table cell values to answer the given a question. WikiTQ Pasupat and Liang
(2015) requires a broader set of reasoning skills, thus is more challenging.
The Table QA task formulation is the same as the ReasTAP pre-training task. We
used the denotation accuracy, which checks whether the predicted answers are
equal to the ground truths, as evaluation metric.

#### Table Facts Verification

We chose TabFact Chen et al. (2020b) to evaluate ReasTAP performance on Table
Facts Verification tasks. Given a table and a statement, TabFact Chen et al.
(2020b) tries to distinguish whether the statement is entailed or refuted by
the table. TabFact divides its test sets into Testsimple and Testcomplex
subsets, where Testcomplex contains examples requiring more complex table
reasoning skills. Furthermore, it selects a small test set Testsmall with 2K
samples for human evaluation. To fine-tune on TabFact, following BART Lewis et
al. (2020), we applied a binary classifier upon the hidden state of the last
token in the decoder for the output. The objective is to generate the
verification label $L\in\\{0,1\\}$ given the statement
$\bm{s}=(s_{1},s_{2},{\cdots},s_{n})$ and the input table $T$:

$L=\underset{i\in\\{0,1\\}}{\mathrm{argmax}}\,P(i\,|\,\bm{s},T\,;\,\theta)$
(2)

We used the accuracy (i.e., percentage of correct predictions) as evaluation
metric.

#### Faithful Table-to-Text Generation

We chose LogicNLG Chen et al. (2020a) to evaluate ReasTAP performance on the
Faithful Table-to-Text Generation task. Compared with previous Table-to-Text
generation benchmarks Wiseman et al. (2017); Balakrishnan et al. (2019);
Parikh et al. (2020); Nan et al. (2022b), which primarily focus on surface-
level realizations without much logical inference, LogicNLG is tasked to
generate statements that are logically entailed by the selected table region.
Given the serialized input table with its selected columns as $T$, the
objective is to generate a sentence $\bm{y}=(y_{1},y_{2},\dots,y_{n})$ that is
both fluent and factually correct:

$\bm{y}=\mathrm{argmax}\prod_{i=1}^{n}P(y_{i}|y_{<i},T\,;\,\theta)$ (3)

To evaluate the logical fidelity of generated sentences, Chen et al. (2020a)
proposed two model-based evaluation methods: Parsing-based Evaluation (SP-
Acc), and NLI-based Evaluation (NLI-Acc). SP-Acc directly extracts the meaning
representation from the generated sentence and executes it against the table
to verify the correctness. NLI-ACC uses a Natural Language Inference (NLI)
model to predict entailment relationships. Following Chen et al. (2020a), we
used SP-Acc, NLI-Acc as logical-fidelity evaluation metrics; and BLEU-1/2/3 as
surface-level evaluation metrics. It is worth noting that higher BLEU scores
do not correlate with better logical fidelity Nan et al. (2022a).

Model | Dev | Test
---|---|---
Previous Models
MAPO Liang et al. (2018) | 71.8 | 72.4
MeRL Agarwal et al. (2019) | 74.9 | 74.8
LatentAlignment Wang et al. (2019) | 79.4 | 79.3
HardEM Min et al. (2019) | 84.4 | 83.9
Pre-trained LMs
TaPas Herzig et al. (2020) | 85.1 | 83.6
GraPPa Yu et al. (2021a) | 85.9 | 84.7
T5-3B Xie et al. (2022) | - | 86.0
TAPEX Liu et al. (2022b) | 89.3 | 89.2
BART | 86.9 | 86.1
ReasTAP | 91.1 | 90.4

Table 3: Denotation accuracies on WikiSQL-Weak.

Model | Dev | Test
---|---|---
Previous Models
MacroGrammer Zhang et al. (2017) | 40.6 | 43.7
MAPO Liang et al. (2018) | 42.7 | 43.8
MeRL Agarwal et al. (2019) | 43.2 | 44.1
LatentAlignment Wang et al. (2019) | 43.7 | 44.5
IterativeSearch Dasigi et al. (2019) | 43.1 | 44.7
Pre-trained LMs
T5-3B Xie et al. (2022) | - | 49.3
TaPas Herzig et al. (2020) | 49.9 | 50.4
TableFormer Yang et al. (2022) | 51.3 | 52.6
TaBERT Yin et al. (2020) | 53.0 | 52.3
GraPPa Yu et al. (2021a) | 51.9 | 52.7
TAPEX Liu et al. (2022b) | 58.0 | 57.2
BART | 37.1 | 37.5
ReasTAP | 58.3 | 58.6

Table 4: Denotation accuracies on WikiTQ.

Model | Dev | Test | Testsimple | Testcomplex | Testsmall
---|---|---|---|---|---
LPA-Ranking Chen et al. (2020b) | 65.1 | 65.3 | 78.7 | 58.5 | 68.9
LFC Zhong et al. (2020) | 71.8 | 71.7 | 85.4 | 65.1 | 74.3
HeterTFV Yang et al. (2020) | 72.5 | 72.3 | 85.9 | 65.1 | 74.2
SAT Zhang et al. (2020) | 73.3 | 73.2 | 85.5 | 67.2 | -
TaPas Herzig et al. (2020) | 81.0 | 81.0 | 92.3 | 75.6 | 83.9
TableFormer Yang et al. (2022) | 82.0 | 81.6 | 93.3 | 75.9 | 84.6
DecompTaPas Yang and Zhu (2021) | 82.7 | 82.7 | 93.6 | 77.4 | 84.7
T5-3B Xie et al. (2022) | - | 83.7 | - | - | -
TAPEX Liu et al. (2022b) | 84.2 | 84.0 | 93.7 | 79.1 | 85.5
BART | 81.0 | 80.5 | 90.6 | 75.7 | 82.3
ReasTAP | 85.1 | 84.7 | 94.1 | 80.1 | 86.2

Table 5: Accuracies on TabFact dataset.

Model | Surface-level | Logical-fidelity
---|---|---
BLEU-1 | BLEU-2 | BLEU-3 | SP-Acc | NLI-Acc
GPT2-TabGen Chen et al. (2020a) | 49.6 | 28.2 | 14.2 | 44.7 | 74.6
GPT2-Coarse-to-Fine Chen et al. (2020a) | 49.0 | 28.3 | 14.6 | 45.3 | 76.4
DCVED Chen et al. (2021a) | 49.5 | 28.6 | 15.3 | 43.9 | 76.9
T5 Liu et al. (2022a) | 52.6 | 32.6 | 19.3 | 48.2 | 80.4
PLOG Liu et al. (2022a) | 51.7 | 32.3 | 18.9 | 48.9 | 85.5
R2D2 Nan et al. (2022a) | 51.8 | 32.4 | 18.6 | 50.8 | 85.6
BART | 53.0 | 32.9 | 19.2 | 50.1 | 83.7
ReasTAP | 52.5 | 32.5 | 18.9 | 54.8 | 89.2

Table 6: Performance on LogicNLG test set.

##  5 Experiments

###  5.1 Implementation Details

We implemented our models based on the fairseq library Ott et al. (2019). We
adopted BART-Large as the backbone model. For table pre-training, we
synthesized and sampled 4M pairs of reasoning examples. In the following
sections, unless specified explicitly, all the experimental results were
evaluated under the default settings of 4M reasoning examples and BART-Large
configuration. Our pre-training procedure ran 80,000 steps with a batch size
of 256, which took about 34 hours on an 8 NVIDIA A5000 24GB cluster. For
downstream tasks, the fine-tuning procedure ran 30,000 steps with a batch size
of 256. The best pre-training and fine-tuning checkpoints were both selected
according to the validation loss.

###  5.2 Main Results

#### Table QA

On WikiSQL-Weak, ReasTAP outperforms all the baselines (Table 3).
Specifically, on the test set of WikiSQL-Weak, ReasTAP achieves a denotation
accuracy of 90.4%, which is 4.3% higher than BART and 1.2% higher than the
previous best performance. On the more challenging WikiTQ, as shown in Table
4, ReasTAP also surpasses the previous best system by 1.4%. It is worth noting
that compared to WikiSQL-Weak, WikiTQ contains much fewer tables and examples,
which makes the adaptation of BART to tabular structures more challenging.
Further ReasTAP obtains an improvement of 21.1% over BART, indicating that in
the low data regime, the improvements brought by ReasTAP are more significant.
We also evaluated ReasTAP performance under low-resource settings (Section
6.1).

#### Table Fact Verification

As shown in Table 5, ReasTAP also obtains a new state-of-the-art accuracy on
all test subsets of TabFact. For example, it surpasses the previous best
system by 0.4% on Testsimple, and 1.0% on Testcomplex.

#### Faithful Table-to-Text Generation

Table 6 presents the results on LogicNLG. It is observed that the BART
backbone has already achieved competitive results in terms of both surface-
level and logical-fidelity metrics. Compared with the BART backbone, ReasTAP
obtains slightly lower results on BLEU scores, which is reasonable since we
continued pre-training ReasTAP on our pre-training corpus that is irrelevant
to the text generation task. However, ReasTAP significantly improves the
logical-fidelity scores, enhancing the SP-Acc and NLI-Acc by 4.7% and 5.5%,
respectively. The results demonstrate that ReasTAP can also help improve
faithful text generation.

##  6 Analysis

%Train | Model | WikiSQL-Weak | WikiTQ | TabFact | LogicNLG
---|---|---|---|---|---
BLEU-1/2/3 | SP-Acc | NLI-Acc
100% | BART | 86.9 | 37.1 | 81.0 | 53.2/33.0/19.3 | 51.6 | 84.3
ReasTAP | 91.1 (+4.2) | 58.3 (+21.2) | 85.1 (+4.1) | 52.8/32.7/19.0 | 55.7 (+4.1) | 90.1 (+5.8)
20% | BART | 76.4 | 21.9 | 77.4 | 52.4/32.5/19.1 | 48.0 | 80.9
ReasTAP | 86.8 (+10.4) | 47.3 (+25.4) | 82.6 (+5.2) | 52.0/31.9/18.7 | 53.6 (+5.6) | 87.2 (+6.3)
5% | BART | 61.4 | 14.7 | 63.5 | 48.6/27.1/14.5 | 45.2 | 75.1
ReasTAP | 81.4 (+20.0) | 36.1 (+21.4) | 74.7 (+11.2) | 47.9/26.3/14.0 | 50.2 (+5.0) | 82.5 (+7.4)

Table 7: Performance on dev set under low-resource setting. Results show the
average over 3 random seeds. Figure 2: ReasTAP downstream task performance on
dev set with different scales of pre-training corpus.

Variant | Dev
---|---
BART | 37.1
ReasTAP | 57.0
w/o Date Difference | 56.7 (-0.3)
w/o Quantifiers Only/Every | 56.4 (-0.6)
w/o Numerical Operation | 55.6 (-1.4)
w/o Conjunction | 55.4 (-1.6)
w/o Numerical Comparison | 55.0 (-2.0)
w/o Temporal Comparison | 54.8 (-2.2)
w/o Counting | 54.3 (-2.7)

Table 8: WikiTQ dev set denotation accuracy with examples of different
reasoning skills removed from the full model pre-training corpus. Each variant
is trained using 900K pre-training examples.

Source Task | BART | ReasTAP
---|---|---
- | 37.1 | 58.3
TabFact | 42.3 (+5.2) | 58.6 (+0.3)
WikiSQL-Weak | 47.6 (+10.5) | 58.4 (+0.1)

Table 9: Dev denotation accuracy of multi-task fine-tuning on the taget task
WikiTQ.

Experimental results on three different kinds of downstream tasks show that
ReasTAP can broadly improve BART’s generic table reasoning capabilities, which
could be adapted to different downstream tasks, regardless of whether the
tasks are highly similar to the ReasTAP pre-training task or not. In this
section, we further analyze our approach in terms of various aspects to
provide researchers with a deeper insight for future work.

###  6.1 Low-resource Setting

To further understand how well ReasTAP learns table reasoning skills during
pre-training, we conducted experiments under the low-resource setting, where
we fine-tuned ReasTAP on 20% and 5% of downstream task training data. As shown
in Table 7, in the low-resource setting, the improvements introduced by
ReasTAP are often more significant. For example, with only 5% training data of
downstream tasks, ReasTAP delivers a dramatic improvement of 20.0%, 21.4%, and
11.2% over BART on WikiSQL-Weak, WikiTQ, and TabFact, respectively. The
results from the low-resource setting show that ReasTAP endows BART with
generic table reasoning capabilities.

###  6.2 The Scale of Pre-training Corpus

Figure 2 illustrates ReasTAP performance on downstream tasks with different
pre-training corpus scales. We found that increasing the pre-training corpus
generally brings positive effects for all downstream tasks. Furthermore, for
simple tasks like WikiSQL-Weak, the gains by scaling up pre-training corpus
are marginal, while for complex tasks like WikiTQ, it shows a positive trend
by scaling up the pre-training corpus.

###  6.3 Necessity of Each Reasoning Skill

We investigated the contributions of the 7 reasoning skills to the downstream
task performance of ReasTAP. We devised 8 variants of ReasTAP: one was trained
with examples from all reasoning skills, while others were trained with
examples without one reasoning skill. For each reasoning skill, we sampled
150K examples from the pre-training corpus. We kept the scale of pre-training
corpus the same (i.e., 900K). We chose WikiTQ for experiments, on which BART
does not perform well. Results shown in Table 8 demonstrate that all reasoning
skills can benefit the model performance on WikiTQ. Furthermore, we find that
some reasoning skills, such as counting and temporal comparison, bring more
improvements to the model compared to others.

The analysis also helps us understand how the sets of pre-defined reasoning
skills are injected during pre-training. When adopting ReasTAP to a new
downstream task that requires new reasoning skills different from existing
seven reasoning skills, one can also inject the new reasoning skill into model
during the pre-training in a similar way. Specifically, once the templates for
the new reasoning skill are designed, the synthesis pipeline will generate new
examples for pre-training. Pre-training ReasTAP on these synthetic examples
can help model learn the new reasoning skill.

###  6.4 Multi-Task Fine-tuning

We further conducted multi-task fine-tuning experiments to explore whether
ReasTAP can benefit from the source task. We chose WikiSQL-Weak and TabFact
for the source task, as their training datasets are relatively rich, and
WikiTQ as the target task. Models were first fine-tuned on the source task and
then fine-tuned on the target task. As shown in Table 9, multi-task fine-
tuning delivers a significant improvement to the target task when initialized
by BART; while the improvements are marginal when initialized by ReasTAP. This
is reasonable because most table reasoning skills acquired by multi-task
learning have been injected into the model during the pre-training.

##  7 Related Work

#### Reasoning Over Tables

Reasoning over the input context is an important requirement for neural models
to be applied in the real world, and especially when the input is structured
knowledge such as a table. Several Table QA benchmarks Pasupat and Liang
(2015); Zhong et al. (2017); Iyyer et al. (2017); Chen et al. (2020c) have
been proposed to test systems’ capability to conduct different types of
reasoning, including numerical, logical or multi-hop reasoning. For Table Fact
Verification tasks Chen et al. (2020b); Aly et al. (2021), the models are
required to perform logical inference to verify whether the given statement is
entailed or refuted. Furthermore, Table-to-Text Chen et al. (2020a); Parikh et
al. (2020); Nan et al. (2022b) tasks to generate a natural language
description of some part of the table based on inferences obtained from facts
in the contexts. More recently, numerical reasoning over tabular data in
financial domain has also raised increasing attention Zhu et al. (2021); Chen
et al. (2021b); Zhao et al. (2022); Cheng et al. (2022); Li et al. (2022);
Zhou et al. (2022).

#### Table Pre-training

Inspired by the huge success of pre-training in natural language, researchers
have attempted to extend pre-training to structured tabular data Yin et al.
(2020); Herzig et al. (2020); Eisenschlos et al. (2020); Shi et al. (2021); Yu
et al. (2021a); Wang et al. (2021b); Deng et al. (2020, 2021); Liu et al.
(2022b) in recent years. Previous table pre-training work such as TaBERT Yin
et al. (2020) and TaPas Herzig et al. (2020); Eisenschlos et al. (2020) took
corrupted tables and NL sentences as input and tried to recover the corrupted
parts. They had the intuition that such recovering processes can help
strengthen the linking between sentences and structured tables. On the other
hand, TAPEX Liu et al. (2022b) learned from synthetic SQL programs. And Jiang
et al. (2022) further pre-trained TAPEX over natural and synthetic QA examples
to improve the few-shot performance over table QA tasks. Meanwhile, pre-
training for Text-to-SQL tasks Shi et al. (2021); Yu et al. (2021a, b); Deng
et al. (2021) also attracted researchers’ attention in recent years. Unlike
previous work, we model the pre-training task as a sequence generation task,
and inject various table reasoning skills into the model by tasking it to
generate the precise answers of reasoning examples.

#### Synthetic Pre-training Corpus

Generating a large-scale synthetic pre-training corpus is widely used in both
natural language pre-training Campagna et al. (2020); Geva et al. (2020);
Yoran et al. (2021); Neeraja et al. (2021); Yue et al. (2022) and table pre-
training Yu et al. (2021a, b); Wang et al. (2021a); Liu et al. (2022b). For
example, Geva et al. (2020) utilized automatically-generated numerical data to
inject numerical reasoning skills during pre-training. And Yoran et al. (2021)
leveraged large-scale WikiPedia resources to automatically generate examples
that requires reasoning over multiple facts in the paragraph, and continue
pre-training LM on this synthetic corpus. Furthermore, recent works Liu et al.
(2022b); Pi et al. (2022) showed that pre-training can be achieved by learning
a program executor over synthetic corpus.

##  8 Conclusion

In this paper, we propose ReasTAP, a new table pre-training approach, which
injects various pre-defined table reasoning skills into models via learning to
generate correct answers of synthetic questions. Compared to previous work
which design table-specific architectures, ReasTAP is easy to implement and is
theoretically applicable to any sequence-to-sequence LM. ReasTAP is evaluated
over four downstream benchmarks. The experimental results demonstrate that
ReasTAP achieves new state-of-the-art results on each of them. This includes
the improvements on WikiSQL-Weak denotation accuracy to 90.4% (+1.2%); WikiTQ
denotation accuracy to 58.6% (+1.4%); TabFact accuracy to 84.7% (+0.7%); and
LogicNLG SP-Acc to 54.8% (+4.0%), NLI-Acc to 89.2% (+3.6%). Further analysis
demonstrates that ReasTAP delivers a significant improvement to BART on the
low-resource setting, indicating that our proposed pre-training approach can
effectively improve the model’s generic table reasoning capabilities.

## Limitations

The main limitation of our approash is that we utilized a template-based
method to synthesize pre-training corpus. Although such template-based
approach ensures the faithfulness of generated QA examples and the diversity
of reasoning process required to answer the questions, it limits the semantic
diversity of questions. We believe future work could exploit 1) more different
types of reasoning skills, such as advanced numerical reasoning skills
required in the finance domain Zhu et al. (2021); Chen et al. (2021b); 2) a
more universal synthetic example generation pipeline; 3) extending models to
tables with hierarchical structures (e.g., more than one row or column header)
Cheng et al. (2022); Zhao et al. (2022); 4) a more efficient training
framework Biesialska et al. (2020); Yoran et al. (2021) that can update models
to learn newly-defined reasoning skills effectively.

## Ethical Consideration

Tables used in our synthetic pre-training corpus are collected and extracted
from the 02-20-2022 Wikipedia
dump222https://archive.org/details/enwiki-20220220, which is publicly
available under the Creative Commons Attribution-ShareAlike 3.0 License and
the GNU Free Documentation License. The licenses permit us to compose, modify,
publish, and distribute additional annotations upon the original content.

## Acknowledgements

We would like to thank the anonymous reviewers and action editors for their
constructive feedback.

## References

  * Agarwal et al. (2019) Rishabh Agarwal, Chen Liang, Dale Schuurmans, and Mohammad Norouzi. 2019.  Learning to generalize from sparse and underspecified rewards.  In _Proceedings of the 36th International Conference on Machine Learning_ , volume 97 of _Proceedings of Machine Learning Research_ , pages 130–140. PMLR.
  * Aly et al. (2021) Rami Aly, Zhijiang Guo, Michael Sejr Schlichtkrull, James Thorne, Andreas Vlachos, Christos Christodoulopoulos, Oana Cocarascu, and Arpit Mittal. 2021.  FEVEROUS: Fact extraction and VERification over unstructured and structured information.  In _Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 1)_.
  * Balakrishnan et al. (2019) Anusha Balakrishnan, Jinfeng Rao, Kartikeya Upasani, Michael White, and Rajen Subba. 2019.  Constrained decoding for neural NLG from compositional representations in task-oriented dialogue.  In _Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics_ , pages 831–844, Florence, Italy. Association for Computational Linguistics.
  * Biesialska et al. (2020) Magdalena Biesialska, Katarzyna Biesialska, and Marta R. Costa-jussà. 2020.  Continual lifelong learning in natural language processing: A survey.  In _Proceedings of the 28th International Conference on Computational Linguistics_ , pages 6523–6541, Barcelona, Spain (Online). International Committee on Computational Linguistics.
  * Brown et al. (2020) Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020.  Language models are few-shot learners.  In _Advances in Neural Information Processing Systems_ , volume 33, pages 1877–1901. Curran Associates, Inc.
  * Campagna et al. (2020) Giovanni Campagna, Agata Foryciarz, Mehrad Moradshahi, and Monica Lam. 2020.  Zero-shot transfer learning with synthesized data for multi-domain dialogue state tracking.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 122–132, Online. Association for Computational Linguistics.
  * Chen et al. (2020a) Wenhu Chen, Jianshu Chen, Yu Su, Zhiyu Chen, and William Yang Wang. 2020a.  Logical natural language generation from open-domain tables.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 7929–7942, Online. Association for Computational Linguistics.
  * Chen et al. (2020b) Wenhu Chen, Hongmin Wang, Jianshu Chen, Yunkai Zhang, Hong Wang, Shiyang Li, Xiyou Zhou, and William Yang Wang. 2020b.  Tabfact: A large-scale dataset for table-based fact verification.  In _International Conference on Learning Representations_.
  * Chen et al. (2020c) Wenhu Chen, Hanwen Zha, Zhiyu Chen, Wenhan Xiong, Hong Wang, and William Wang. 2020c.  Hybridqa: A dataset of multi-hop question answering over tabular and textual data.  _Findings of EMNLP 2020_.
  * Chen et al. (2021a) Wenqing Chen, Jidong Tian, Yitian Li, Hao He, and Yaohui Jin. 2021a.  De-confounded variational encoder-decoder for logical table-to-text generation.  In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 5532–5542, Online. Association for Computational Linguistics.
  * Chen et al. (2021b) Zhiyu Chen, Wenhu Chen, Charese Smiley, Sameena Shah, Iana Borova, Dylan Langdon, Reema Moussa, Matt Beane, Ting-Hao Huang, Bryan Routledge, and William Yang Wang. 2021b.  Finqa: A dataset of numerical reasoning over financial data.  _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_.
  * Cheng et al. (2022) Zhoujun Cheng, Haoyu Dong, Zhiruo Wang, Ran Jia, Jiaqi Guo, Yan Gao, Shi Han, Jian-Guang Lou, and Dongmei Zhang. 2022.  HiTab: A hierarchical table dataset for question answering and natural language generation.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 1094–1110, Dublin, Ireland. Association for Computational Linguistics.
  * Dasigi et al. (2019) Pradeep Dasigi, Matt Gardner, Shikhar Murty, Luke Zettlemoyer, and Eduard Hovy. 2019\.  Iterative search for weakly supervised semantic parsing.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 2669–2680, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Deng et al. (2021) Xiang Deng, Ahmed Hassan Awadallah, Christopher Meek, Oleksandr Polozov, Huan Sun, and Matthew Richardson. 2021.  Structure-grounded pretraining for text-to-SQL.  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 1337–1350, Online. Association for Computational Linguistics.
  * Deng et al. (2020) Xiang Deng, Huan Sun, Alyssa Lees, You Wu, and Cong Yu. 2020.  Turl: Table understanding through representation learning.  _Proc. VLDB Endow._ , 14(3):307–319.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Dong et al. (2019) Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xiaodong Liu, Yu Wang, Jianfeng Gao, Ming Zhou, and Hsiao-Wuen Hon. 2019.  Unified language model pre-training for natural language understanding and generation.  In _Advances in Neural Information Processing Systems_ , volume 32. Curran Associates, Inc.
  * Eisenschlos et al. (2020) Julian Eisenschlos, Syrine Krichene, and Thomas Müller. 2020.  Understanding tables with intermediate pre-training.  In _Findings of the Association for Computational Linguistics: EMNLP 2020_ , pages 281–296, Online. Association for Computational Linguistics.
  * Geva et al. (2020) Mor Geva, Ankit Gupta, and Jonathan Berant. 2020.  Injecting numerical reasoning skills into language models.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 946–958, Online. Association for Computational Linguistics.
  * Herzig et al. (2020) Jonathan Herzig, Pawel Krzysztof Nowak, Thomas Mueller, Francesco Piccinno, and Julian Eisenschlos. 2020.  Tapas: Weakly supervised table parsing via pre-training.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 4320–4333.
  * Iyyer et al. (2017) Mohit Iyyer, Wen-tau Yih, and Ming-Wei Chang. 2017.  Search-based neural structured learning for sequential question answering.  In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 1821–1831, Vancouver, Canada. Association for Computational Linguistics.
  * Jiang et al. (2022) Zhengbao Jiang, Yi Mao, Pengcheng He, Graham Neubig, and Weizhu Chen. 2022.  OmniTab: Pretraining with natural and synthetic data for few-shot table-based question answering.  In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 932–942, Seattle, United States. Association for Computational Linguistics.
  * Lewis et al. (2020) Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020.  BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 7871–7880, Online. Association for Computational Linguistics.
  * Li et al. (2022) Moxin Li, Fuli Feng, Hanwang Zhang, Xiangnan He, Fengbin Zhu, and Tat-Seng Chua. 2022.  Learning to imagine: Integrating counterfactual thinking in neural discrete reasoning.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 57–69, Dublin, Ireland. Association for Computational Linguistics.
  * Liang et al. (2018) Chen Liang, Mohammad Norouzi, Jonathan Berant, Quoc Le, and Ni Lao. 2018.  Memory augmented policy optimization for program synthesis and semantic parsing.  In _Proceedings of the 32nd International Conference on Neural Information Processing Systems_ , NIPS’18, page 10015–10027, Red Hook, NY, USA. Curran Associates Inc.
  * Liu et al. (2022a) Ao Liu, Haoyu Dong, Naoaki Okazaki, Shi Han, and Dongmei Zhang. 2022a.  Plog: Table-to-logic pretraining for logical table-to-text generation.  _arXiv preprint arXiv:2205.12697_.
  * Liu et al. (2022b) Qian Liu, Bei Chen, Jiaqi Guo, Morteza Ziyadi, Zeqi Lin, Weizhu Chen, and Jian-Guang Lou. 2022b.  TAPEX: Table pre-training via learning a neural SQL executor.  In _International Conference on Learning Representations_.
  * Min et al. (2019) Sewon Min, Danqi Chen, Hannaneh Hajishirzi, and Luke Zettlemoyer. 2019.  A discrete hard EM approach for weakly supervised question answering.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 2851–2864, Hong Kong, China. Association for Computational Linguistics.
  * Nan et al. (2022a) Linyong Nan, Lorenzo Jaime Yu Flores, Yilun Zhao, Yixin Liu, Luke Benson, Weijin Zou, and Dragomir Radev. 2022a.  R2d2: Robust data-to-text with replacement detection.  _arXiv preprint arXiv:2205.12467_.
  * Nan et al. (2022b) Linyong Nan, Chiachun Hsieh, Ziming Mao, Xi Victoria Lin, Neha Verma, Rui Zhang, Wojciech Kryściński, Nick Schoelkopf, Riley Kong, Xiangru Tang, Mutethia Mutuma, Ben Rosand, Isabel Trindade, Renusree Bandaru, Jacob Cunningham, Caiming Xiong, and Dragomir Radev. 2022b.  FeTaQA: Free-form Table Question Answering.  _Transactions of the Association for Computational Linguistics_ , 10:35–49.
  * Neeraja et al. (2021) J. Neeraja, Vivek Gupta, and Vivek Srikumar. 2021.  Incorporating external knowledge to enhance tabular reasoning.  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 2799–2809, Online. Association for Computational Linguistics.
  * Ott et al. (2019) Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, and Michael Auli. 2019.  fairseq: A fast, extensible toolkit for sequence modeling.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations)_ , pages 48–53, Minneapolis, Minnesota. Association for Computational Linguistics.
  * Parikh et al. (2020) Ankur Parikh, Xuezhi Wang, Sebastian Gehrmann, Manaal Faruqui, Bhuwan Dhingra, Diyi Yang, and Dipanjan Das. 2020.  ToTTo: A controlled table-to-text generation dataset.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 1173–1186, Online. Association for Computational Linguistics.
  * Pasupat and Liang (2015) Panupong Pasupat and Percy Liang. 2015.  Compositional semantic parsing on semi-structured tables.  In _Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 1470–1480, Beijing, China. Association for Computational Linguistics.
  * Pi et al. (2022) Xinyu Pi, Qian Liu, Bei Chen, Morteza Ziyadi, Zeqi Lin, Yan Gao, Qiang Fu, Jian-Guang Lou, and Weizhu Chen. 2022.  Reasoning like program executors.  _arXiv preprint arXiv:2201.11473_.
  * Raffel et al. (2020) Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020.  Exploring the limits of transfer learning with a unified text-to-text transformer.  _Journal of Machine Learning Research_ , 21(140):1–67.
  * Shi et al. (2021) Peng Shi, Patrick Ng, Zhiguo Wang, Henghui Zhu, Alexander Hanbo Li, Jun Wang, Cicero Nogueira dos Santos, and Bing Xiang. 2021.  Learning contextual representations for semantic parsing with generation-augmented pre-training.  _Proceedings of the AAAI Conference on Artificial Intelligence_ , 35(15):13806–13814.
  * Vaswani et al. (2017) Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. 2017.  Attention is all you need.  In _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc.
  * Wang et al. (2019) Bailin Wang, Ivan Titov, and Mirella Lapata. 2019.  Learning semantic parsers from denotations with latent structured alignments and abstract programs.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 3774–3785, Hong Kong, China. Association for Computational Linguistics.
  * Wang et al. (2021a) Bailin Wang, Wenpeng Yin, Xi Victoria Lin, and Caiming Xiong. 2021a.  Learning to synthesize data for semantic parsing.  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 2760–2766, Online. Association for Computational Linguistics.
  * Wang et al. (2022) Fei Wang, Zhewei Xu, Pedro Szekely, and Muhao Chen. 2022.  Robust (controlled) table-to-text generation with structure-aware equivariance learning.  In _Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 5037–5048, Seattle, United States. Association for Computational Linguistics.
  * Wang et al. (2021b) Zhiruo Wang, Haoyu Dong, Ran Jia, Jia Li, Zhiyi Fu, Shi Han, and Dongmei Zhang. 2021b.  Tuta: Tree-based transformers for generally structured table pre-training.  In _Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining_ , KDD ’21, page 1780–1790, New York, NY, USA. Association for Computing Machinery.
  * Wiseman et al. (2017) Sam Wiseman, Stuart Shieber, and Alexander Rush. 2017.  Challenges in data-to-document generation.  In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_ , pages 2253–2263, Copenhagen, Denmark. Association for Computational Linguistics.
  * Xie et al. (2022) Tianbao Xie, Chen Henry Wu, Peng Shi, Ruiqi Zhong, Torsten Scholak, Michihiro Yasunaga, Chien-Sheng Wu, Ming Zhong, Pengcheng Yin, Sida I Wang, et al. 2022\.  Unifiedskg: Unifying and multi-tasking structured knowledge grounding with text-to-text language models.  _arXiv preprint arXiv:2201.05966_.
  * Yang et al. (2022) Jingfeng Yang, Aditya Gupta, Shyam Upadhyay, Luheng He, Rahul Goel, and Shachi Paul. 2022.  TableFormer: Robust transformer modeling for table-text encoding.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 528–537, Dublin, Ireland. Association for Computational Linguistics.
  * Yang et al. (2020) Xiaoyu Yang, Feng Nie, Yufei Feng, Quan Liu, Zhigang Chen, and Xiaodan Zhu. 2020\.  Program enhanced fact verification with verbalization and graph attention network.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 7810–7825, Online. Association for Computational Linguistics.
  * Yang and Zhu (2021) Xiaoyu Yang and Xiaodan Zhu. 2021.  Exploring decomposition for table-based fact verification.  In _Findings of the Association for Computational Linguistics: EMNLP 2021_ , pages 1045–1052, Punta Cana, Dominican Republic. Association for Computational Linguistics.
  * Yin et al. (2020) Pengcheng Yin, Graham Neubig, Wen-tau Yih, and Sebastian Riedel. 2020.  TaBERT: Pretraining for joint understanding of textual and tabular data.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 8413–8426, Online. Association for Computational Linguistics.
  * Yoran et al. (2021) Ori Yoran, Alon Talmor, and Jonathan Berant. 2021.  Turning tables: Generating examples from semi-structured tables for endowing language models with reasoning skills.  _arXiv preprint arXiv:2107.07261_.
  * Yu et al. (2021a) Tao Yu, Chien-Sheng Wu, Xi Victoria Lin, bailin wang, Yi Chern Tan, Xinyi Yang, Dragomir Radev, richard socher, and Caiming Xiong. 2021a.  Gra{pp}a: Grammar-augmented pre-training for table semantic parsing.  In _International Conference on Learning Representations_.
  * Yu et al. (2021b) Tao Yu, Rui Zhang, Alex Polozov, Christopher Meek, and Ahmed Hassan Awadallah. 2021b.  {SC}ore: Pre-training for context representation in conversational semantic parsing.  In _International Conference on Learning Representations_.
  * Yue et al. (2022) Xiang Yue, Ziyu Yao, and Huan Sun. 2022.  Synthetic question value estimation for domain adaptation of question answering.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 1340–1351, Dublin, Ireland. Association for Computational Linguistics.
  * Zayats et al. (2021) Vicky Zayats, Kristina Toutanova, and Mari Ostendorf. 2021.  Representations for question answering from documents with tables and text.  In _Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume_ , pages 2895–2906, Online. Association for Computational Linguistics.
  * Zhang et al. (2020) Hongzhi Zhang, Yingyao Wang, Sirui Wang, Xuezhi Cao, Fuzheng Zhang, and Zhongyuan Wang. 2020.  Table fact verification with structure-aware transformer.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 1624–1629, Online. Association for Computational Linguistics.
  * Zhang et al. (2017) Yuchen Zhang, Panupong Pasupat, and Percy Liang. 2017.  Macro grammars and holistic triggering for efficient semantic parsing.  In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_ , pages 1214–1223, Copenhagen, Denmark. Association for Computational Linguistics.
  * Zhao et al. (2022) Yilun Zhao, Yunxiang Li, Chenying Li, and Rui Zhang. 2022.  MultiHiertt: Numerical reasoning over multi hierarchical tabular and textual data.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 6588–6600, Dublin, Ireland. Association for Computational Linguistics.
  * Zhong et al. (2017) Victor Zhong, Caiming Xiong, and Richard Socher. 2017.  Seq2sql: Generating structured queries from natural language using reinforcement learning.  _CoRR_ , abs/1709.00103.
  * Zhong et al. (2020) Wanjun Zhong, Duyu Tang, Zhangyin Feng, Nan Duan, Ming Zhou, Ming Gong, Linjun Shou, Daxin Jiang, Jiahai Wang, and Jian Yin. 2020.  LogicalFactChecker: Leveraging logical operations for fact checking with graph module network.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 6053–6065, Online. Association for Computational Linguistics.
  * Zhou et al. (2022) Fan Zhou, Mengkang Hu, Haoyu Dong, Zhoujun Cheng, Shi Han, and Dongmei Zhang. 2022\.  Tacube: Pre-computing data cubes for answering numerical-reasoning questions over tabular data.  _arXiv preprint arXiv:2205.12682_.
  * Zhu et al. (2021) Fengbin Zhu, Wenqiang Lei, Youcheng Huang, Chao Wang, Shuo Zhang, Jiancheng Lv, Fuli Feng, and Tat-Seng Chua. 2021.  TAT-QA: A question answering benchmark on a hybrid of tabular and textual content in finance.  In _Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_ , pages 3277–3287.

Dataset |  Example Input |  Example Output
---|---|---
WikiSQL-Weak |  How many players played for adams state school? [HEAD]Pick # $|$ CFL team $|$ Player $|$ Position $|$ College [ROW] 145 $|$ calgary stampeders $|$ brett ralph $|$ wr $|$ alberta [ROW] 246 $|$ ottawa renegades $|$ lenard semajuste $|$ fb $|$ adam state $\dots$ |  3
WikiTQ |  Which coach served previous to ardis smith? [HEAD]Tenure $|$ Coach $|$ Years $|$ Record $|$ Pct. [ROW] 11892 $|$ Shelby Fletcher $|$ 1 $|$ 1–0 $|$ 1.000 [ROW] 21893 $|$ W. M. Walker $|$ 1 $|$ 4–6–1 $|$ .409 $\dots$ |  F. C. Owen
TabFact |  John E. Moss and Phillip Burton are both re-elected in the house of representative election. [HEAD]District $|$ Incumbent $|$ Party $|$ Result $|$ Candidates [ROW] Clifornia 3 $|$ John E. Moss $|$ democratic $|$ re-elected $|$ JohnE. Moss (d) 69.9% John Rakus (r) 30.1% [ROW] California 5 $|$ Phillip Burton $|$ democratic $|$ re-elected $|$ Phillip Burton (d) 81.8% Edlo E. Powell (r) 18.2% $\dots$ |  1
(entailed)
LogicNLG |  Players for Jazz. [HEAD]Player | School / Club Team | Year [ROW] Adrian Dantley | Notre Dame | 1979 - 1986 [ROW] Brad Davis | Maryland | 1982 - 1984$\dots$ |  John Duren played for Utah Jazz for 2 years.
Table 10:  The example inputs and outputs for our model on experimental
datasets.