
can be decoupled and (2) the “complicated" rea-
soning process can be disentangled into multi-step
executions of compositional “fundamental" reason-
ing modules, whose compositionality can be learnt
with limited data. Also, the “fundamental" nature
of basic reasoning skills allows them to have rich
training instances for reliable skill pre-training.
Under these motivations, this paper proposes the
modular and compositional reasoning framework -
ReasonFormer
, to mirror human’s compositional
reasoning process, with the following characteris-
tics: (1) the representation module and reasoning
modules are decoupled; (2) reasoning modules are
modular and professional in fundamental reason-
ing skills; (3) reasoning modules are compositional
in parallel and cascaded manner, to dynamically
decide the activated reasoning skills and the reason-
ing complexity; (4) the general-purpose reasoning
framework is end-to-end and unified in solving
multiple tasks with one model.
Specifically, the representation module learns
contextual representations of problems. Upon the
top of the it, there are cascaded reasoning mod-
ules to perform compositional multi-step reasoning.
The reasoning modules are pre-trained to expert
in specific reasoning skills (e.g., logic, QA, fact,
etc.). These pre-trained reasoning skills are con-
sidered relatively fundamental and have rich re-
sources. Two additional blocks complete the whole
framework: the reasoning router and the reason-
ing adapter. The reasoning router decides which
reasoning skills are activated in each reasoning
step, and when to stop the reasoning process. The
adapter adapts the reused reasoning modules to
different steps of the reasoning process.
We comprehensively evaluate the framework on
11 datasets emphasizing different reasoning skills
and complexity, and highlight the following find-
ings: (1) Substantial performance boosts demon-
strate models’ harvest of compositional reasoning
ability, and both the reasoning-centric pre-training
and reasoning adapter bring compounding perfor-
mance gains. (2) Results of few-shot experiments
show that specialized modules enables better gener-
alization by learning to compose pre-trained skills
for low-resource tasks, and decoupling of repre-
sentation module and reasoning modules. (3) Fur-
ther analysis reveals the distinct reasoning skills
required for different tasks at different reasoning
depths, shoring up the modularity of reasoning
modules.
2 Reasoning Skills Formulation
The compositional reasoning process of LMs’ re-
lies on the pre-training of several fundamental rea-
soning skills and their compositionality. Hence, the
selection of skills is critical.
Selection Principles.
There are two major prin-
ciples in selecting skills: (1)
Fundamental
: Com-
plex problems can be decomposed and solved by
simpler basic skills. So the basic skills should be
more fundamental, well-defined, and can be cov-
ered in the required skill set of as many tasks as pos-
sible; (2)
Resourceful
: Reliable skill pre-training
requires large-scale pre-training data. However, in
the real-world scenario, the annotated data is ex-
pensive to obtain for most reasoning tasks. So it is
expected that there are already rich resource or data
can be collected via self(semi)-supervised manner.
Basic Skills Selection.
Humans always solve
complex problem with fundamental skills, like un-
derstanding key information (e.g., entity and its
type) of events, recalling related facts, understand-
ing causal relations between events, and extracting
answers for the question. This motivates us to se-
lect the following basic skills: the
logic ability
to logically deduce the cause or consequence of
events;
simple question answering (QA)
to un-
derstand the context and answer simple questions;
named entity recognition (NER)
to identify im-
portant entities in the context;
natural language
inference (NLI)
to identify semantic relevance of
two sentences and
factual knowledge
to memo-
rize commonsense knowledge and understand daily
events. There is an additional
general
skill to learn
the commonly shared knowledge across selected
skills. We keep this setting in our paper as they are
relatively well defined and resourceful 1.
We adopt self-supervised methods to construct
pre-training corpus for {logic ability,factual knowl-
edge,NER}, semi-supervised method to construct
pre-training corpus for simple QA, and large-scale
supervised data for NLI. Further details are given
in§4.2 and examples are given in Appendix A.
3ReasonFormer Framework
As shown in Fig. 2, the general-purpose reason-
ing framework is built based on encoder-decoder
1
It is worth noting that this selection is tentative. There
are plausible ways for selecting basic skills or knowledge
domains, which also inspire future directions.