Coordination Among Neural Modules Through a Shared Global Workspace

1 INTRODUCTION 1 . Parallel , competing specialists 2 . Write to shared workspace 3 . Broadcast workspace contents Figure 1 : Step 1 : an ensemble of specialist modules doing their own default processing ; at a particular computational stage , depending upon the input , a subset of the specialists becomes active . Step 2 : the active specialists get to write information in a shared global workspace . Step 3 : the contents of the workspace are broadcast to all specialists . Deep Learning has seen a movement towards more structured models with cleaner separation between different pieces of information often handled by different components . The induced structure , and separation of knowledge has improved generalization , model-size scaling , and long-range dependencies ( Berner et al. , 2019 ; Vinyals et al. , 2019 ; Brown et al. , 2020 ) . This opens up questions about how to achieve coherence and coordination between different components in such architectures . Looking back to the 1980s , the focus in AI was much less on learning and more on constructing articulated , multi-component architectures and examining how intelligence might emerge from interactions among this collection of simple , functionally specialized components ( Fodor , 1983 ; Braitenberg , 1986 ; Minsky , 1988 ; Brooks , 1991 ) . Each of these specialist modules is on the scale of a typical component of a computer program , like a subroutine that implements a narrow , prespecified function from certain input contents to certain output contents.1 Through appropriate communication and coordination , a set of specialists can achieve complex , dynamic , and flexible behavior patterns . 1In the literature , specialists are sometimes referred to as processes or agents . As a concrete illustration , consider the task of driving a car in terms of specialists . One specialist might monitor the position of the car with respect to lines on the road , and another specialist might adjust the steering direction based on the perceptual data . In addition , there might be specialists which provide alerts when certain events occur , such as loud sounds , reaching a critical intersection on a route , or coming into close proximity to the car in front . To execute the task of driving the car properly , all these specialists need to interact coherently and broadcast their individual information to each other . Arguably , modern ML and AI has yet to develop broad architectural frameworks for learning both the specialist modules and how they should interact , while the classical view lacks an articulate story about how learning could take place successfully in such frameworks . In this article , we revisit this classical view with modern machine learning tools based on end-to-end learning and differentiable memory and attention mechanisms . Inspired by the Global Workspace Theory ( Baars , 1993 ; Dehaene et al. , 1998 ; Shanahan and Baars , 2005 ; Shanahan , 2006 ; 2010 ; 2012 ; Dehaene et al. , 2017 ) from cognitive neuroscience , we argue that more flexibility and generalization emerge through an architecture of specialists if their training encourages them to communicate effectively with one another via the bottleneck of a shared workspace ( Figure . 1 ) . Distributed specialist modules . From a computational perspective , articulated multi-component architectures composed of sparsely interacting specialist modules show desirable scaling properties ( e.g. , more specialists can seamlessly be added ) , increased robustness ( the system can tolerate the removal of or changes in individual specialists ) , and efficiency ( information is processed predominantly locally , reducing the cost of communication between specialists ) . However , modularization also requires mechanisms to establish sharing of compatible representations across specialists , a form of shared internal language . While portions of a task might be solved by independent specialists , synchronization is critical particularly when there are statistical , functional , or causal dependencies among the specialists . Coherence through a shared workspace . In cognitive neuroscience , the Global Workspace Theory ( GWT ) ( Baars , 1993 ; Dehaene et al. , 2017 ) suggests an architecture allowing specialist modules to interact . The key claim of GWT is the existence of a shared representation—sometimes called a blackboard , sometimes a workspace—that can be modified by any specialist and that is broadcast to all specialists , along with the notion that write access is limited to maintain coherence . Our interpretation of this restriction on write access is that it stems from an assumption on the form of the joint distribution between high-level concepts . In this paper , we explore a communication and coordination scheme similar to the one proposed by GWT for modern neural network architectures like Transformers ( Vaswani et al. , 2017 ; Dehghani et al. , 2018 ; Parmar et al. , 2018 ; Radford et al. , 2019 ; Brown et al. , 2020 ) and attention-based modular architectures ( Goyal et al. , 2019 ; Rahaman et al. , 2020 ; Mittal et al. , 2020a ; Goyal et al. , 2020 ; Madan et al. , 2021 ) . In terms of our driving example , the workspace could be used to override default behaviors by giving high priority to specialist modules which provide alerts of various sorts ( loud sounds , presence of a child on the street ) , allowing specialists which respond to such alerts to take control of behavior over default driving routines . This scenario implies that prioritization of signals in a shared workspace is critical . A shared communication channel necessitates common representations . For a multitude of specialist modules to cooperate , a common language is necessary ( Baars , 1997 ) . For example , in the driving scenario , alerts may come from auditory or visual processing specialists , but regardless of the source , a signal for danger must be placed in the workspace to override default behavior , whether that behavior is controlled by a radio-tuning specialist or a steering specialist . Although specialist modules can be pre-wired to have compatible communication interfaces , we will model an architecture in which an ensemble of specialist modules is trained in coordination , which should lead to a shared language ( Colagrosso and Mozer , 2005 ) . Internally , individual specialists can use whatever form of representations that serves them , but their inputs and outputs require alignment with other specialists in order to synchronize . For example , an unusual event such as a rough thud under the wheels might not have been previously experienced , but the mere signalling of novelty could override default specialists . Without a global communication channel , specialists would have to learn to communicate through pairwise interactions , which might limit coordination of behavior in novel situations : global communication ensures exchangeability of knowledge to achieve systematic generalization . 2 SYNCHRONIZING NEURAL MODULES THROUGH A SHARED WORKSPACE . We investigate a neural architecture reminiscent of the GW model , where a number of sparsely communicating specialist modules interact via a shared working memory . In particular , we extend the Transformer ( Vaswani et al. , 2017 ) , attention and slot-based modular architectures ( Goyal et al. , 2019 ) by adding a shared workspace and allowing modules ( each representing an entity ) to compete for write access in each computational stage . Key-value attention . Key-value attention defines the backbone of updates to the hidden states in the proposed model . This form of attention is widely used in self-attention models and performs well on a wide array of tasks ( Bahdanau et al. , 2014 ; Vaswani et al. , 2017 ; Santoro et al. , 2018 ) . Key-value attention selects an input value based on the match of a query vector to a key vector associated with each value . To allow differentiability and thus easier learnability , selection is soft and computes a convex combination of all the values . Such a mechanism makes it possible to change on-the-fly both the source of input and how the shared workspace is updated . It also makes the outputs of the specialists and the elements of the memory permutation invariant : they should be considered as an unordered set of elements to be selected by an attention mechanism from the contents of specialists . More precisely , soft attention uses the product of a query ( represented as a matrix Q of dimensionality Nr × d , with Nr queries , and d the dimension of each query ) with a set of No objects each associated with a key as a row in matrix KT ( No × d ) . After normalization with a softmax the resulting convex weights are used to combine the values Vi ( row i of matrix V ) : where the softmax is applied to each row of its argument matrix , yielding a set of convex weights . For our experiments , we use multihead dot product attention . Neural modules with pairwise interactions . Our approach to synchronizing neural modules is highly general and mostly agnostic to the task , domain , or specific choice of architecture , with the only requirement being that the model consists of multiple specialist modules which either operate independently or have sparse interactions requiring to only match pairs of modules at a time . Our goal is to explore how introducing a shared workspace can help these modules to become better synchronized and coordinated . We show the utility of the shared workspace for synchronization in ( a ) Transformers ( Vaswani et al. , 2017 ) , in which all interactions between positions are performed via attention , and ( b ) slot-based architectures like Recurrent Independent Mechanisms or RIMs ( Goyal et al. , 2019 ) in which all pairwise interactions between modules are performed via attention . In the context of slot-based architectures , each slot ’ s content is associated with a specialist module , whereas in Transformers different entities each associated with a different position acts as a specialist module ( Figure 2 ) . Both Transformers and RIMs utilize a self-attention mechanism for sharing information between modules , typically implemented in a pairwise manner , i.e. , each specialist attends to every other specialist . Instead , we facilitate information sharing among specialist modules through a limited capacity shared workspace . In this framework at each computational stage , different specialists compete for write access to the common workspace . The contents of the workspace , in turn , are broadcast to all specialist modules simultaneously . Notation . The input is processed through a sequence of computational stages indexed by t , and at each stage , ns entities are operated on ( i.e. , ns different modules in slot-based architectures like RIMs or ns different positions in the case of Transformers ) . Each of these ns specialist modules has a distinct internal nh-dimensional state hkt , for k ∈ { 1 , ... , ns } . The specialist modules communicate with each other via a shared workspace divided into nm memory slots , each consisting of a vector of nl elements , denoted M = [ m1 ; . . .mj ; . . .mnm ] . The shared workspace is updated across different computational stages i.e. , different time-steps in recurrent architecture and different layers in the case of Transformers . At each computational stage t , different specialists compete for writing in the shared workspace , but all specialists can read from the current state of the workspace . In the case of an autoregressive task , we can restrict the information sharing to previous positions and keep a separate version of the workspace for each position .

Summary: This paper proposes a communication framework to have multiple modules communicate and switch precedence efficiently, taking inspiration from Global Workspace Theory in cognitive science. The primary contribution is a scheme to replace complete pairwise communications in modularized architectures with a single, limited-capacity workspace that persists and changes over stages of computation. This workspace is implemented with a read/write scheme that iterates through stages of computation (layers in a Transformer or steps in a recurrent architecture): in the write phase, the shared memory is updated according to the current states of the modules that are most informative to the shared memory's current state as determined by a key-value attention scheme, with the modules competing via softmax. In the read phase, the internal states of all modules are updated via another key-value attention scheme. The advantages are claimed to be 1) higher order interaction among modules because every module learns from every other one (at least, more than pairwise), dynamic filtering because the memory persists and updates stage to stage; and linear computational complexity because the number of memory slots doesn't change much (and it's typically small, 1-10).    The related work motivates this paper by the classical AI principle that intelligent systems should have multiple specialized modules rather than one general entity. It distinguishes from prior slot-based memory work in that memory writes here are sparse and competitive, and prior work on reducing computational complexity of Transformer dot product attention through its persistent memory. It aptly assesses itself as a unification of existing ideas.   The experimentation section tests different parts of the proposed scheme. The triangles experiment tests the comparative speed to convergence (and accuracy) of the HO communications here compared to pairwise in baseline Transformer. The MNIST generation experiment with TIMs shows that the shared workspace gives an advantage on domains where input dimensions are mostly independent. The CATER experiment shows a similar result to the triangles experiment (quickly picking out only relevant information) but in a time series, and the Sort-of-CLEVR experiment again reinforces the power of the shared workspace on sparse tasks. The physical reasoning shows general improvement, and the Atari performance shows considerable improvement due to modularization.