Abstract: The modularity of a network quantifies the extent, relative to a null model network, to which vertices cluster into community groups. We define a null model appropriate for bipartite networks, and use it to define a bipartite modularity. The bipartite modularity is presented in terms of a modularity matrix B; some key properties of the eigenspectrum of B are identified and used to describe an algorithm for identifying modules in bipartite networks. The algorithm is based on the idea that the modules in the two parts of the network are dependent, with each part mutually being used to induce the vertices for the other part into the modules. We apply the algorithm to real-world network data, showing that the algorithm successfully identifies the modular structure of bipartite networks.

\section*{Acknowledgments}\label{sec:acknowledgments}}

\newcommand{\largeparens}[1]{\left ( #1 \right )}
\newcommand{\largesquare}[1]{\left [ #1 \right ]}
\newcommand{\largecurly}[1]{\left \{ #1 \right \}}
\newcommand{\largeangle}[1]{\left \langle #1 \right \rangle }
\newcommand{\largestraight}[1]{\left | #1 \right |}

\newcommand{\rightarrow}{\rightarrow}
\newcommand{\times}{\times}
\newcommand{\mid}{\mid}
\newcommand{\frac{1}{2}}{\frac{1}{2}}
\newcommand{\krondelta}[2]{\ensuremath{\delta\largeparens{#1,#2}}}
\newcommand{\largecurly}{\largecurly}
\newcommand{\largestraight}{\largestraight}

\newcommand{\quad}{\quad}
\newcommand{\mathpuncspace,}{\quad,}
\newcommand{\mathpuncspace.}{\quad.}

\newcommand{\int\!\!\!\int}{\int\!\!\!\int}
\newcommand\tripleint{{\int\!\!\!\int\!\!\!\int}}

\newcommand{\mat}[1]{\mathbf{#1}}
\newcommand{\vctr}[1]{\mathbf{#1}}
\newcommand{\innerproduct}[2]{\largeangle{#1, #2}}
\newcommand{\outerproduct}[2]{#1\transpose{#2}}
\newcommand{\transpose}[1]{#1^\mathrm{T}}
\newcommand{\matrixdims}[2]{\ensuremath{#1 \times #2}}

\newcommand{\trace}[1]{\mathrm{Tr}\,\,#1}
\newcommand{\tracequad}[2]{\traceweightedinner{#1}{#2}{#1}}
\newcommand{\traceweightedinner}[3]{\trace{\weightedinner{#1}{#2}{#3}}}
\newcommand{\weightedinner}[3]{\transpose{#1}#2#3}
\newcommand{\traceouter}[2]{\trace{\transpose{#1}#2}}
\newcommand{\matrixinnerproduct}[2]{\transpose{#1}{#2}}
\newcommand{\traceinner}[2]{\trace{\matrixinnerproduct{#1}{#2}}}

\newcommand{\mat{O}}{\mat{O}}

\newcommand{\largesquare}{\largesquare}
\newcommand{\bipartsubstructurewithsize}[3]{\largesquare{
	\begin{array}{cc}
		\mat{O}_{\matrixdims{#2}{#2}} & #1_{\matrixdims{#2}{#3}} \\
		(\transpose{#1})_{\matrixdims{#3}{#2}} & \mat{O}_{\matrixdims{#3}{#3}}
	\end{array}}}
\newcommand{\bipartsubstructure}[1]{\largesquare{
	\begin{array}{cc}
		\mat{O} & #1 \\
		\transpose{#1} & \mat{O}
	\end{array}}}
\newcommand{\bipartvctr}[2]{\largesquare{
	\begin{array}{c}
		#1 \\
		#2
	\end{array}}}

\newcommand{\redsum}[1]{\sum_{#1=1}^{\numred}}
\newcommand{\bluesum}[1]{\sum_{#1=1}^{\numblue}}
\newcommand{\redbluesum}[2]{\redsum{#1}\bluesum{#2}}

\newcommand{^{(r)}}{^{(r)}}
\newcommand{^{(b)}}{^{(b)}}

\newcommand{\ensuremath{n}}{\ensuremath{n}}
\newcommand{\ensuremath{m}}{\ensuremath{m}}
\newcommand{\numred}{\ensuremath{p}}
\newcommand{\numblue}{\ensuremath{q}}

\newcommand{\mat{A}}{\mat{A}}
\newcommand{\adjelem}[2]{A_{#1#2}}
\newcommand{\adjsubmat}{\mat{\tilde{A}}}
\newcommand{\adjsubelem}[2]{\tilde{A}_{#1#2}}

\newcommand{\mat{P}}{\mat{P}}
\newcommand{\probelem}[2]{P_{#1#2}}
\newcommand{\probsubmat}{\mat{\tilde{P}}}
\newcommand{\probsubelem}[2]{\tilde{P}_{#1#2}}

\newcommand{\ensuremath{c}}{\ensuremath{c}}
\newcommand{\ensuremath{Q}}{\ensuremath{Q}}
\newcommand{\frac{1}{2\numedges}}{\frac{1}{2\ensuremath{m}}}
\newcommand{\frac{1}{\numedges}}{\frac{1}{\ensuremath{m}}}

\newcommand{\module}[1]{\ensuremath{g_{#1}}}
\newcommand{\redmodule}[1]{\module{#1}}
\newcommand{\bluemodule}[1]{\ensuremath{h_{#1}}}

\newcommand{\modsum}[1]{\sum_{#1=1}^{\ensuremath{c}}}

\newcommand{\mat{S}}{\mat{S}}
\newcommand{\indvec}[1]{\vctr{s}_{#1}}
\newcommand{\mat{R}}{\mat{R}}
\newcommand{\mat{T}}{\mat{T}}
\newcommand{\redindvec}[1]{\vctr{r}_{#1}}
\newcommand{\blueindvec}[1]{\vctr{t}_{#1}}
\newcommand{\redindelem}[2]{R_{#1#2}}
\newcommand{\blueindelem}[2]{T_{#1#2}}

\newcommand{\mat{B}}{\mat{B}}
\newcommand{\modelem}[2]{B_{#1#2}}
\newcommand{\modsubmat}{\mat{\tilde{B}}}
\newcommand{\modsubelem}[2]{\tilde{B}_{#1#2}}

\newcommand{\reddegrees}[1]{k_{#1}}
\newcommand{\bluedegrees}[1]{d_{#1}}

\newcommand{\normconst}{\ensuremath{C}}

\newcommand{\vctr{x}}{\vctr{x}}
\newcommand{\leadingevecelem}[1]{x_{#1}}
\newcommand{\lambda}{\lambda}
\newcommand{\bipartitionindex}[1]{\largesquare{#1{1} \mid #1{2}}}

\newcommand{\bipartevec}[1]{\vctr{x}_{#1}}
\newcommand{\biparteval}[1]{\lambda_{#1}}
\newcommand{\redevec}[1]{\vctr{u}_{#1}}
\newcommand{\blueevec}[1]{\vctr{v}_{#1}}

\newcommand{\singval}[1]{\sigma_{#1}}

\newcommand{\mat{\tilde{R}}}{\mat{\tilde{R}}}
\newcommand{\redmodwtvec}[1]{\vctr{\tilde{r}}_{#1}}
\newcommand{\redmodwtelem}[2]{\tilde{R}_{#1#2}}
\newcommand{\mat{\tilde{T}}}{\mat{\tilde{T}}}
\newcommand{\bluemodwtvec}[1]{\vctr{\tilde{t}}_{#1}}
\newcommand{\bluemodwtelem}[2]{\tilde{T}_{#1#2}}

\newcommand{\nummodules_\mathrm{max}}{\ensuremath{c}_\mathrm{max}}

\newcommand{p_{\mathrm{in}}}{p_{\mathrm{in}}}
\newcommand{p_{\mathrm{out}}}{p_{\mathrm{out}}}
\newcommand{N_{\mathrm{mod}}}{N_{\mathrm{mod}}}
\newcommand{N_{\mathrm{red}}}{N_{\mathrm{red}}}
\newcommand{N_{\mathrm{blue}}}{N_{\mathrm{blue}}}

\newcommand{\ensuremath{I}}{\ensuremath{I}}
\newcommand{\mutinfo}[2]{\ensuremath{I}\largeparens{#1, #2}}
\newcommand{\ensuremath{I_\mathrm{norm}}}{\ensuremath{I_\mathrm{norm}}}
\newcommand{\normalizedmutinfo}[2]{\ensuremath{I_\mathrm{norm}}\largeparens{#1, #2}}
\newcommand{\ensuremath{H}}{\ensuremath{H}}
\newcommand{\entropy}[1]{\ensuremath{H}\largeparens{#1}}
\newcommand{\relentsum}[3]{\sum_{#3} #1 \log \frac{#1}{#2}}
\newcommand{\entropysum}[2]{-\sum_{#2} #1 \log #1}
\newcommand{\mat{N}}{\mat{N}}
\newcommand{\confusionelem}[2]{N_{#1 #2}}
\newcommand{\ensuremath{X}}{\ensuremath{X}}
\newcommand{\ensuremath{Y}}{\ensuremath{Y}}
\newcommand{\indmat_{X}}{\mat{S}_{X}}
\newcommand{\indmat_{Y}}{\mat{S}_{Y}}
\newcommand{\probability}[1]{\ensuremath{P\largeparens{#1}}}

 %

 %

 %

 %

 %

 %
 %

\newcommand{\wraprefprepost}[3]{\wrapprepost{#1}{#2}{\ref{#3}}}
\newcommand{\ref}{\ref}
\newcommand{\wraprefprepost{(}{)}}{\wraprefprepost{(}{)}}
\newcommand{\wraprefprepost{[}{]}}{\wraprefprepost{[}{]}}
\newcommand{\wraprefprepost{\{}{\}}}{\wraprefprepost{\{}{\}}}
\newcommand{\wraprefprepost{\(\langle\)}{\(\rangle\)}}{\wraprefprepost{\(\langle\)}{\(\rangle\)}}

\newcommand{\wrapprepost}[3]{{#1}{#3}{#2}}
\newcommand{}{}
\newcommand{\wrapprepost{(}{)}}{\wrapprepost{(}{)}}
\newcommand{\wrapprepost{[}{]}}{\wrapprepost{[}{]}}
\newcommand{\wrapprepost{\{}{\}}}{\wrapprepost{\{}{\}}}
\newcommand{\wrapprepost{\(\langle\)}{\(\rangle\)}}{\wrapprepost{\(\langle\)}{\(\rangle\)}}

\newcommand{\tagwithlabel}[2]{#1~#2}
\newcommand{\adjacentlabel}[2]{#1#2}

\newcommand{\makelabeledcrossrefmacro}[4]
	{\newcommand{#3}{#1{#4}{#2}}}
\newcommand{\makecrossrefmaker}[3]
	{\newcommand{#1}{\makelabeledcrossrefmacro{#2}{#3}}}

\newcommand{\formatrefparens}{\wraprefprepost{(}{)}}
\newcommand{\tagwithlabel}{\tagwithlabel}
\newcommand{eq.}{eq.}
\newcommand{Eq.}{Eq.}
\newcommand{eqs.}{eqs.}
\newcommand{Eqs.}{Eqs.}

\newcommand{\eqnrefformat}{\formatrefparens}
\makecrossrefmaker{\newlabeledeqnref}{\tagwithlabel}{\eqnrefformat}
\makecrossrefmaker{\newwordpluseqnref}{\tagwithlabel}{\eqnrefformat}

\newlabeledeqnref{\eqn}{eq.}
\newlabeledeqnref{\Eqn}{Eq.}
\newlabeledeqnref{\eqns}{eqs.}
\newlabeledeqnref{\Eqns}{Eqs.}

\newwordpluseqnref{\andeqn}{and}
\newwordpluseqnref{\througheqn}{through}

\newcommand{\formatrefplain}{\ref}
\newcommand{\tagwithlabel}{\tagwithlabel}
\newcommand{fig.}{fig.}
\newcommand{Fig.}{Fig.}
\newcommand{figs.}{figs.}
\newcommand{Figs.}{Figs.}

\newcommand{\figrefformat}{\formatrefplain}
\makecrossrefmaker{\newlabeledfigref}{\tagwithlabel}{\figrefformat}
\makecrossrefmaker{\newwordplusfigref}{\tagwithlabel}{\figrefformat}

\newlabeledfigref{\fig}{fig.}
\newlabeledfigref{\Fig}{Fig.}
\newlabeledfigref{\figs}{figs.}
\newlabeledfigref{\Figs}{Figs.}

\newwordplusfigref{\andfig}{and}
\newwordplusfigref{\throughfig}{through}

\newcommand{\formatrefplain}{\ref}
\newcommand{\tagwithlabel}{\tagwithlabel}
\newcommand{section}{section}
\newcommand{Section}{Section}
\newcommand{sections}{sections}
\newcommand{Sections}{Sections}

\newcommand{\sxnrefformat}{\formatrefplain}
\makecrossrefmaker{\newlabeledsxnref}{\tagwithlabel}{\sxnrefformat}
\makecrossrefmaker{\newwordplussxnref}{\tagwithlabel}{\sxnrefformat}

\newlabeledsxnref{\sxn}{section}
\newlabeledsxnref{\Sxn}{Section}
\newlabeledsxnref{\sxns}{sections}
\newlabeledsxnref{\Sxns}{Sections}

\newwordplussxnref{\andsxn}{and}
\newwordplussxnref{\throughsxn}{through}

\newcommand{\formatrefplain}{\ref}
\newcommand{\tagwithlabel}{\tagwithlabel}
\newcommand{table}{table}
\newcommand{Table}{Table}
\newcommand{tables}{tables}
\newcommand{Tables}{Tables}

\newcommand{\tblrefformat}{\formatrefplain}
\makecrossrefmaker{\newlabeledtblref}{\tagwithlabel}{\tblrefformat}
\makecrossrefmaker{\newwordplustblref}{\tagwithlabel}{\tblrefformat}

\newlabeledtblref{\tbl}{table}
\newlabeledtblref{\Tbl}{Table}
\newlabeledtblref{\tbls}{tables}
\newlabeledtblref{\Tbls}{Tables}

\newwordplustblref{\andtbl}{and}
\newwordplustblref{\throughtbl}{through}
\renewcommand{eq.}{Eq.}
\renewcommand{eqs.}{Eqs.}
\renewcommand{Eq.}{Equation}
\renewcommand{Eqs.}{Equations}
\renewcommand{fig.}{Fig.}
\renewcommand{figs.}{Figs.}
\renewcommand{Fig.}{Figure}
\renewcommand{Figs.}{Figures}

\listfiles

\graphicspath{{pdffigs/}{epsfigs/}{mpsfigs/}}

\begin{document}

\title{Modularity and community detection in bipartite networks.  }

\author{Michael J. Barber}

\affiliation{Austrian Research Centers GmbH---ARC, Bereich systems research, Vienna, Austria}
\email{michael.barber@arcs.ac.at}

\date{\today}

\begin{abstract}

The modularity of a network quantifies the extent, relative to a null model network, to which vertices cluster into community groups. We define a null model appropriate for bipartite networks, and use it to define a bipartite modularity. The bipartite modularity is presented in terms of a modularity matrix \( \mat{B} \); some key properties of the eigenspectrum of \( \mat{B} \) are identified and used to describe an algorithm for identifying modules in bipartite networks. The algorithm is based on the idea that the modules in the two parts of the network are dependent, with each part mutually being used to induce the vertices for the other part into the modules. We apply the algorithm to real-world network data, showing that the algorithm successfully identifies the modular structure of bipartite networks.

\end{abstract}

\pacs{89.75.Hc, 02.10.Ud}

\maketitle

\section{Introduction}\label{sec:introduction}

Networks have attracted a burst of attention in the last decade (useful reviews include Refs.~\cite{ChrAlb:2007,New:2006,New:2003,AlbBar:2002}), with applications to natural, social, and technological networks. Of great current interest is the identification of the modular structure of the network. Detecting modules, or communities, allows quantitative investigation of relevant subnetworks, which may have different properties from the aggregate properties of the network as a whole, e.g.,  modules in the World Wide Web are sets of topically related web pages.

Informally, a network module is a subgraph whose vertices are more likely to be connected to one another than to the vertices outside the subgraph. A variety of approaches \citep{AngBocMarPelStr:2007,GolKog:2006,Has:2006,NewLei:2007,ReiBor:2006,PalDerFarVic:2005,NewGir:2004,ClaNewMoo:2004,GirNew:2002} have been taken to explore this concept. See Refs.~\cite{DanDiaDucAre:2005,New:2004b} for useful reviews.

In this work we focus on the measure called modularity, introduced by \citet{NewGir:2004}. Modularity reflects the extent, relative to a null model network, to which edges are formed within modules instead of between modules. Using the modularity, we can assess the quality of any assignment of vertices to modules. Further, the module identification problem becomes a modularity optimization problem. However, exact maximization of the modularity is in general an intractable problem, because the number of ways to partition the set of vertices grows extremely rapidly \citep{Rot:1964}. In light of this, a number of effective algorithms have been introduced to find high modularity partitions of the vertices \citep{PujBejDel:2006,New:2004a}. The modularity can be also be defined in terms of a so-called modularity matrix, the eigenspectrum of which has a fundamental relationship with the modular nature of the network \citep{New:2006a}.

Given the explicit dependence of the modularity upon a null model, it is clear that the specific choice of null model has a profound impact on the modularity. Surprisingly, only one null model has been so far  explored at length: networks with edges randomly assigned such that the expected degrees of model-network vertices equal the actual degrees of corresponding real-network vertices \citep{New:2006a}. Specific classes of networks have additional constraints that could be and, indeed, should be reflected in the null model.

A significant such class of networks is that of bipartite networks. The vertices of a bipartite network can be partitioned into two disjoint sets such that no two vertices within the same set are adjacent. There are thus two distinct kinds of vertices, providing a natural representation for many affiliation or interaction networks, with one kind of vertex representing actors and the other representing relations. Examples of actor-relation pairs include people attending events \citep{DavGarGar:1941,Fre:2003,DorBatFer:2004}, court justices making decisions \citep{DorBatFer:2004}, scientists jointly publishing articles \citep{New:2001a,New:2001}, organizations collaborating in projects \citep{BarKruKruRoe:2006,RoeBar:2007}, and legislators serving on committees \citep{PorMucNewFri:2007}. Arguably, bipartite networks are the empirically standard case for social networks and other interaction networks, with unipartite networks appearing---often implicitly---as projections.

In the statistical physics community, the usual approach taken to identify modules in bipartite networks is to first construct a unipartite projection of one part of the network, and then identify modules in that projection using methods for unipartite networks. For example, in the scientist-publication network mentioned above, a network of scientists is created by linking scientists when they have jointly published. These unipartite projection can be illuminating, but intrinsically lose information---indeed, \citet{GuiSalAma:2007} demonstrate that analysis of an unweighted, unipartite projection can give unreliable or incorrect results.

The principal contribution in this work is a proposed definition of a modularity for bipartite networks. The approach taken is based on defining a bipartite modularity matrix \( \mat{B} \) as an extension of the recent work by \citet{New:2006a}. Some key properties of the eigenspectrum of \( \mat{B} \) are identified and used to specialize Newman's matrix-based algorithms to bipartite networks. An additional algorithm fundamentally based on the bipartite character of the networks is introduced; we call the algorithm BRIM\xspace, for bipartite, recursively induced modules.

In parallel, \citet{GuiSalAma:2007} have independently investigated modularity in bipartite networks. They proceed by first identifying the two parts of the network as actors and teams, and then formulating a bipartite modularity in which modules consist of groups of actors that are closely interconnected based on joint participation in many teams. The resulting modularity is thus focused on identifying modules in only one part of the network at a time. Interesting, \citeauthor{GuiSalAma:2007} point out the possibilities of classifying both partite sets of the network simultaneously and of customizing spectral methods for bipartite networks, which is essentially the approach taken in the present work.

As of this writing, we are aware of no other attempts to define modularity for bipartite networks. However bipartite networks, or ``two mode networks,'' have undergone several related studies in the sociology community using other methods (see, e.g., Refs.~\cite{DorBatFer:2004,Fre:2003} and references cited therein).

The structure of the paper is as follows: in \sxn{sec:bipartite_modularity} we define a modularity matrix and measure for bipartite networks. We discuss using the bipartite modularity matrix to identify modules in \sxn{sec:module_identification}, and apply the algorithm therein devised to two real-world networks in \sxn{sec:results}. Finally, we conclude in \sxn{sec:conclusions} with an assessment of the present investigation and an outlook for future work.

\section{Bipartite Modularity}\label{sec:bipartite_modularity}

In this section, we develop a modularity matrix for bipartite networks. Structurally and notationally, the development parallels the discussion of the modularity matrix by \citet{New:2006a}.

Consider a network with \( \ensuremath{n} \) vertices and \( \ensuremath{m} \) edges defined by an adjacency matrix \( \mat{A} \). Each vertex \( i \) is assigned to a community group or module, denoted by \module{i}. The modularity \( \ensuremath{Q} \) for such an assignment reflects the extent, relative to a null model, to which edges are formed within modules instead of between modules. Formally, the modularity is defined as
\begin{equation}
	\ensuremath{Q} = \frac{1}{2\numedges} \sum_{i,j}
			\largeparens{\adjelem{i}{j} - \probelem{i}{j}}
			\krondelta{\module{i}}{\module{j}}
	\mathpuncspace,
	\label{eq:defmodularity}
\end{equation}
where the \( \adjelem{i}{j} \) are the adjacency matrix elements and the \( \probelem{i}{j} \) are probabilities in the null model that an edge exists between vertices \( i \) and \( j \).

The modularity can be given an equivalent definition in matrix form. First, the \( \ensuremath{n} \) community indices \( \module{i} \) with values taken from \( \largecurly{1, 2, \ldots, \ensuremath{c}} \) are replaced by an \( \matrixdims{\ensuremath{n}}{\ensuremath{c}} \) index matrix \( \mat{S} = \largesquare{\indvec{1} \mid \indvec{2} \mid \cdots \mid \indvec{\ensuremath{c}}} \), where \( \ensuremath{c} \) is the number of modules. All elements of \( \mat{S} \) take on either a 0 or 1 value, so that column \( \indvec{i} \) is an index vector showing membership in module \( i \); a value of 1 in position \( j \) of \( \indvec{i} \) indicates that vertex \( j \) belongs to module \( i \). Given that each vertex is assigned to exactly one module, each row of \( \mat{S} \) has a single unit value and the index vectors are thus orthogonal.

Further, a modularity matrix \( \mat{B} \) is defined with elements
\begin{equation}
	\modelem{i}{j} = \adjelem{i}{j} - \probelem{i}{j}
	\mathpuncspace.
	\label{eq:defmodularitymatrix}
\end{equation}
Using \( \mat{S} \) and \( \mat{B} \), the modularity becomes
\begin{equation}
	\ensuremath{Q} = \frac{1}{2\numedges}\tracequad{\mat{S}}{\mat{B}}
	\mathpuncspace.
	\label{eq:defmatrixformmodularity}
\end{equation}
The eigenspectrum of \( \mat{B} \) has a fundamental relationship with the modular nature of the network, as \citet{New:2006a} has explored.

From \eqns{eq:defmodularity} \througheqn{eq:defmatrixformmodularity}, it is apparent that the choice of null model has a profound impact on the modularity. Thus, for example, a Bernoulli random graph with constant \( \probelem{i}{j} = p\) for all \( i \) and \( j \) is a poor representation of most real-world networks, so would be an inappropriate choice of null model. Instead, the usual choice of null model \citep{New:2006a} assigns edges at random with the expected degrees of model vertices constrained to match the degrees in the actual network.

In much the same fashion, bipartite networks have specific constraints that should be reflected in the null model. The vertices of a bipartite network can be partitioned into two disjoint sets such that no two vertices within the same set are adjacent. An equivalent, but more visual, definition is that the vertices in a bipartite graph can be assigned one of two colors, say red and blue, with no neighboring vertices bearing the same color. In the remainder of this section, we will define a null model with the above requirement that the expected degrees match the degrees in the real network, along with the additional constraint that each edge links a red vertex and a blue vertex.

Let \( \numred \) be the number of red vertices and \( \numblue \) be the number of blue vertices; this implies \( \ensuremath{n} = \numred + \numblue \). Without loss of generality, assume that the vertices are indexed so that red vertices are labeled \( 1, 2, \ldots, \numred \) and the blue vertices are labeled \( \numred+1, \numred+2, \ldots, \numred+\numblue \). The adjacency matrix then has a block off-diagonal form of
\begin{equation}
	\mat{A} = \bipartsubstructurewithsize{\adjsubmat}{\numred}{\numblue}
	\mathpuncspace,
	\label{eq:adjmatrixsubstructure}
\end{equation}
where \( \mat{O}_{\matrixdims{i}{j}} \) is the all-zero matrix with \( i \) rows and \( j \) columns. Require the same block structure for \( \mat{P} \) that is exhibited by \( \mat{A} \), giving
\begin{equation}
	\mat{P} = \bipartsubstructurewithsize{\probsubmat}{\numred}{\numblue}
	\mathpuncspace.
	\label{eq:probmatrixsubstructure}
\end{equation}
This form for \( \mat{P} \) assigns zero likelihood to edges between vertices with the same color,  precluding any such edges in the null model.

The modularity matrix \( \mat{B} \) in turn has a block off-diagonal form of
\begin{equation}
	\mat{B} = \bipartsubstructurewithsize{\modsubmat}{\numred}{\numblue}
	\mathpuncspace,
	\label{eq:modmatrixsubstructure}
\end{equation}
where \( \modsubmat = \adjsubmat - \probsubmat \). The all-zero blocks on the diagonal are the potential modularity contributions from pairs of vertices of the same color being present in a module; all meaningful contributions, positive or negative, to the modularity thus are made by pairs of vertices with distinct colors. In contrast, with the usual null model based on unipartite networks \citep{New:2006a}, the corresponding blocks contain only negative elements (or zeros for isolated nodes of degree zero), always providing a modularity penalty for pairs of like-colored vertices in the same module.

\Eqn{eq:defmodularity} can be rewritten as
\begin{equation}
	\ensuremath{Q} = \frac{1}{\numedges} \redbluesum{i}{j} \modsubelem{i}{j} \krondelta{\redmodule{i}}{\bluemodule{j}}
	\label{eq:defsubstructuremodularity}
	\mathpuncspace,
\end{equation}
where \( \bluemodule{j} = \module{j+\numred} \). Since \( \ensuremath{Q} = 0 \) when all vertices are in the same module, we can set all \( \redmodule{i} \) and \( \bluemodule{j} \) equal, giving
\begin{equation}
	\redbluesum{i}{j}\largeparens{\adjsubelem{i}{j} - \probsubelem{i}{j}} = 0
\end{equation}
so that
\begin{equation}
	\redbluesum{i}{j} \probsubelem{i}{j} = \redbluesum{i}{j} \adjsubelem{i}{j} = \ensuremath{m}
	\mathpuncspace.
	\label{eq:submatrixsumstonumedges}
\end{equation}
Thus, the expected number of edges in the null model must equal the number of edges in the actual network.

The degrees of the red vertices are given by \( \bluesum{j}\adjsubelem{i}{j} = \reddegrees{i} \), while those of the blue vertices are given by \( \redsum{i}\adjsubelem{i}{j} = \bluedegrees{j} \). By constraining the expected degrees in the null model to match the actual degrees, as discussed above, we obtain
\begin{eqnarray}
	\bluesum{j}\probsubelem{i}{j} & = & \reddegrees{i} \label{eq:expectedreddegrees}\\
	\redsum{i}\probsubelem{i}{j} & = & \bluedegrees{j} \label{eq:expectedbluedegrees}
	\mathpuncspace.
\end{eqnarray}
Since
\begin{eqnarray}
	\redsum{i} \reddegrees{i} & = & \ensuremath{m} \label{eq:reddegreesum}\\
	\bluesum{j} \bluedegrees{j} & = & \ensuremath{m} \label{eq:bluedegreesum}
	\mathpuncspace,
\end{eqnarray}
\eqns{eq:expectedreddegrees} \andeqn{eq:expectedbluedegrees} ensure that \eqn{eq:submatrixsumstonumedges} holds.

In the usual null model, the probability of an edge being present between two vertices is proportional to the product of the degrees of the vertices. For the bipartite case, this becomes \( \probsubelem{i}{j} = \normconst \reddegrees{i} \bluedegrees{j} \) for some constant \( \normconst \). Combining this definition with \eqns{eq:expectedbluedegrees} \andeqn{eq:reddegreesum}, we obtain
\begin{eqnarray}
	\bluedegrees{j} & = & \redsum{i} \probsubelem{i}{j} \nonumber \\
	& = & \normconst \redsum{i} \reddegrees{i} \bluedegrees{j} \nonumber \\
	& = & \largeparens{\normconst \ensuremath{m}} \bluedegrees{j} \label{eq:derivenormconst}
	\mathpuncspace,
\end{eqnarray}
so that \( \normconst = 1/\ensuremath{m} \) and thus
\begin{equation}
	\probsubelem{i}{j} = \frac{\reddegrees{i} \bluedegrees{j}}{\ensuremath{m}}
	\mathpuncspace.
	\label{eq:defprobedges}
\end{equation}
The same result can be obtained from \eqns{eq:expectedreddegrees} \andeqn{eq:bluedegreesum} instead of \eqns{eq:expectedbluedegrees} \andeqn{eq:reddegreesum}. With \eqn{eq:defprobedges}, we have fully defined the modularity \( \ensuremath{Q} \) for a bipartite network.

\section{Module Identification}\label{sec:module_identification}

\subsection{Spectral Methods for Module Identification}\label{sec:spectral_methods_for_module_identification}

Using the modularity defined in \sxn{sec:bipartite_modularity}, we can assess the quality of any partitioning of the vertices of a bipartite graph into modules. A partitioning can be determined using any method. Two general approaches seem relevant. First, the modularity defined in \sxn{sec:bipartite_modularity} can be maximized using standard optimization algorithms such as genetic algorithms, greedy search methods \citep{New:2004a}, or extremal optimization \citep{DucAre:2005}; this is generally straightforward and will not be discussed at length in this work. Second, the spectral properties of \( \mat{B} \) or other matrices associated with the graph can be analyzed to partition the vertices into modules.

For example, one standard partitioning approach is to assign the vertices to modules using spectral partitioning (SP). In spectral partitioning, the eigenvectors of the network Laplacian are used to minimize the number of edges running between groups. The SP approach has a significant drawback: the vertices are assigned to modules of predetermined size. This is problematic for the investigation of real-world networks, where the number and sizes of community groups are not generally known in advance.

An analogous approach based on the spectral properties of the modularity matrix \( \mat{B} \) has recently been proposed \citep{New:2006a}. Since the modularity is conceptually closer to our understanding of network community structure, this spectral optimization of modularity (SOM) is better tailored for real world networks.

An important special case in both spectral partitioning and spectral optimization of modularity is to assign the vertices to two groups based on a single eigenvector of the Laplacian (SP) or modularity (SOM) matrix. In the case of SP, we are interested in the eigenvector corresponding to the smallest positive eigenvalue; this is the Fiedler vector. For SOM, we are interested in the leading eigenvector \( \vctr{x} \), corresponding to the largest positive eigenvalue \( \lambda \) of \( \mat{B} \); we propose calling this the \emph{Newman vector}. Using the Newman vector, we approximate \( \mat{B} \) as
\begin{equation}
	\mat{B} \approx \lambda \outerproduct{\vctr{x}}{\vctr{x}}
	\mathpuncspace.
	\label{eq:modularitymatrix1d}
\end{equation}
With just two modules, \( \mat{S} = \bipartitionindex{\indvec} \), so that the modularity in \eqn{eq:defmatrixformmodularity} becomes
\begin{equation}
	\ensuremath{Q} = \frac{\lambda}{2\ensuremath{m}} \largeparens{
		\innerproduct{\indvec{1}}{\vctr{x}}^{2} +
		\innerproduct{\indvec{2}}{\vctr{x}}^{2}}
	\mathpuncspace.
	\label{eq:modularity1d}
\end{equation}
Recall that the index vectors \( \indvec{1} \) and \( \indvec{2} \) take on values from \( \largecurly{0, 1} \). It is clear how to maximize the modularity in \eqn{eq:modularity1d}: when \( \leadingevecelem{i} \), the \(i\)th element of \(\vctr{x}\), is positive, assign vertex \( i \) to the first module by setting the \( i \)th entry of \( \indvec{1} \) to one, and when \( \leadingevecelem{i} \) is negative, assign vertex \( i \) to the second module by setting the \( i \)th entry of \( \indvec{2} \) to one \footnote{The assignment when \( \leadingevecelem{i} = 0 \) is arbitrary, and makes no contribution to the modularity.}.

The use of multiple of eigenvectors allows more than two modules to be considered (\( \ensuremath{c} > 2 \)), with at most one module more than the number of positive eigenvalues of \( \mat{B} \) \citep{New:2006a}. Additional eigenvectors of \( \mat{B} \) can also be used for SOM \citep{New:2006a} in a vector partitioning algorithm adapted from spectral partitioning \citep{AlpYao:1995,AlpKahYao:1999}. In the present work, we will not make use of this algorithm, nor of a recursive bipartitioning approach, instead developing an alternative technique that capitalizes on the bipartite nature of the networks.

\subsection{Module Identification in Bipartite Networks}\label{sec:module_identification_in_bipartite_networks}

In \sxn{sec:spectral_methods_for_module_identification}, we have seen how to identify community groups of networks by using the Newman vector to maximize \( \ensuremath{Q} \). However, we made no use of the bipartite character of the networks. For a bipartite network, the eigenvalue equation \( \mat{B} \bipartevec{i} = \biparteval{i} \bipartevec{i}\) can be written as
\begin{equation}
	\bipartsubstructure{\modsubmat} \bipartvctr{\redevec{i}}{\blueevec{i}} =
	\biparteval{i} \bipartvctr{\redevec{i}}{\blueevec{i}}
	\mathpuncspace,
	\label{eq:bipartmodmateigenvalueproblem}
\end{equation}
where \( \redevec{i} \) is a \( \matrixdims{\numred}{1} \) vector and \( \blueevec{i} \) is a \( \matrixdims{\numblue}{1} \) vector. The left-hand side of \eqn{eq:bipartmodmateigenvalueproblem} can be multiplied out, giving
\begin{equation}
	\bipartsubstructure{\modsubmat} \bipartvctr{\redevec{i}}{\blueevec{i}} =
	\bipartvctr{\modsubmat\blueevec{i}}{\transpose{\modsubmat}\redevec{i}} =
	\biparteval{i} \bipartvctr{\redevec{i}}{\blueevec{i}}
	\mathpuncspace,
	\label{eq:bipartmodmateigenvalueproblemexpanded}
\end{equation}
i.e., \( \modsubmat\blueevec{i} = \biparteval{i}\redevec{i}   \) and \( \transpose{\modsubmat}\redevec{i} = \biparteval{i}\blueevec{i} \).

Additionally, we can construct a vector from \( \redevec{i} \)  and \( - \blueevec{i} \), so that
\begin{equation}
	\bipartsubstructure{\modsubmat} \bipartvctr{\redevec{i}}{-\blueevec{i}} =
	\bipartvctr{-\modsubmat\blueevec{i}}{\transpose{\modsubmat}\redevec{i}} =
	-\biparteval{i} \bipartvctr{\redevec{i}}{-\blueevec{i}}
	\mathpuncspace.
	\label{eq:bipartmodmatnegativeeigenvalues}
\end{equation}
Hence, for any eigenvalue \( \biparteval{i} \) of \( \mat{B} \),  \( - \biparteval{i} \) is also an eigenvalue of \( \mat{B} \).

Since only the eigenvectors corresponding to positive eigenvalues of \( \mat{B} \)  can give positive contributions to \( \ensuremath{Q} \), we can focus on just the positive eigenvalues \( \singval{i} = \largestraight{\biparteval{i}} > 0\). In this case, \( \redevec{i} \) and \( \blueevec{i} \) are, respectively, left and right singular vectors of \( \modsubmat \). If we shift our attention from the spectral decomposition of \( \mat{B} \) to the singular value decomposition (SVD) of \( \modsubmat \), we therefore automatically exclude the eigenvectors of \( \mat{B} \) that correspond to negative eigenvalues.

The appearance of the singular vectors of \( \modsubmat \) is not surprising. All the information about the linkage structure of the network is contained in \( \modsubmat \), and the singular value decomposition is the natural generalization of the spectral decomposition used for \( \mat{B} \) to asymmetric matrices like \( \modsubmat \). What is more, the singular values and singular vectors of \( \modsubmat \) can sometimes provide more information than the eigenvalues and eigenvectors of \( \mat{B} \).

For example, the number of modules is at most one more than the number of positive eigenvalues of \( \mat{B} \). Since, for each vertex, the expected degree in the null model equals the actual degree in the network, the rows and columns of \( \modsubmat \) all sum to zero. The rank \( r \) of \( \modsubmat \), which equals the number of singular values of \( \modsubmat \), must then be less than both \( \numred \) and \( \numblue \). From this, we conclude that the number of communities is at most equal to the smaller of \( \numred \) and \( \numblue \).

To assign vertices to modules using \( \modsubmat \), we first partition the index matrix \( \mat{S} \) so that
\begin{equation}
	\mat{S} = \bipartvctr{\mat{R}}{\mat{T}}
	\mathpuncspace.
	\label{eq:partitionindexmatrix}
\end{equation}
The matrices \( \mat{R} \) and \( \mat{T} \) have dimensions \( \matrixdims{\numred}{\ensuremath{c}} \) and \( \matrixdims{\numblue}{\ensuremath{c}} \), respectively, indexing the red and blue vertices into \( \ensuremath{c} \) modules.
Substituting the partitioned matrices into \eqn{eq:defmatrixformmodularity}, we obtain
\begin{equation}
	\ensuremath{Q} = \frac{1}{\numedges} \traceweightedinner{\mat{R}}{\modsubmat}{\mat{T}}
	\mathpuncspace.
	\label{eq:defsubmatmodularity}
\end{equation}
Our goal then becomes to assign network vertices to modules such that \eqn{eq:defsubmatmodularity} is maximized.

One approach to optimizing the modularity as expressed in \eqn{eq:defsubmatmodularity} is essentially the same as the Newman vector approach considered in \sxn{sec:spectral_methods_for_module_identification}. Without loss of generality, label the singular values such that \( \singval{1} \geq \singval{2} \geq \singval{r} > 0 \). Approximate \( \modsubmat \) as
\begin{equation}
	\modsubmat \approx \singval{1}\outerproduct{\redevec{1}}{\blueevec{1}}
	\mathpuncspace.
	\label{eq:leadingsingvalmodularityapproximation}
\end{equation}
Now, we bipartition the vertices with \( \mat{R} = \bipartitionindex{\redindvec} \) and \( \mat{T} = \bipartitionindex{\blueindvec} \), so that
\begin{equation}
	\ensuremath{Q} = \frac{\singval{1}}{\ensuremath{m}} \largeparens{
		\innerproduct{\redindvec{1}}{\redevec{1}}
		\innerproduct{\blueindvec{1}}{\blueevec{1}}
		+
		\innerproduct{\redindvec{2}}{\redevec{1}}
		\innerproduct{\blueindvec{2}}{\blueevec{1}}
	}
	\mathpuncspace.
	\label{eq:bipartmodularity1d}
\end{equation}
As with the Newman vector approach, \( \ensuremath{Q} \) is maximized by assigning the vertices to modules based on the signs of the corresponding component of \( \redevec{1} \) or \( \blueevec{1} \), as appropriate. This maximizes the magnitude of the inner products in \eqn{eq:bipartmodularity1d}, with consistent assignment of both red and blue vertices to the same module based on the signs ensuring that positive contributions are made to the modularity.

\subsection{Recursive Identification of Bipartite Modules}\label{sec:recursive_identification_of_bipartite_modules}

In \sxns{sec:spectral_methods_for_module_identification} \andsxn{sec:module_identification_in_bipartite_networks}, we have seen how the leading eigenvector of \( \mat{B} \) and the leading singular vectors of \( \modsubmat \) can be used to bipartition network vertices. Extending these methods to use the full modularity matrices and to handle more than two modules is in general nontrivial. However, for the bipartite case at least, there is a relatively straightforward extension that leads to a useful algorithm.

First, we assume that the blue vertices are all assigned to modules through some mechanism. Maximizing the modularity then consists solely of assigning the red vertices to modules. This is a comparatively simple task. To see this, rewrite \eqn{eq:defsubmatmodularity}, giving
\begin{eqnarray}
	\ensuremath{Q} & = & \frac{1}{\numedges} \traceweightedinner{\mat{R}}{\modsubmat}{\mat{T}} \nonumber\\
	& = & \frac{1}{\numedges} \traceinner{\mat{R}}{\mat{\tilde{T}}}
	\mathpuncspace,
	\label{eq:fixedbluemodularity}
\end{eqnarray}
where we have aggregated the fixed terms into the matrix \( \mat{\tilde{T}} = \modsubmat \mat{T} \). We now write \eqn{eq:fixedbluemodularity} in terms of explicit sums, so that
\begin{eqnarray}
	\ensuremath{Q} & = & \frac{1}{\numedges} \modsum{k} \redsum{i} \redindelem{i}{k} \bluemodwtelem{i}{k} \nonumber \\
	& = & \frac{1}{\numedges} \redsum{i} \largeparens{\modsum{k} \redindelem{i}{k} \bluemodwtelem{i}{k}}
	\mathpuncspace.
	\label{eq:fixedbluemodularityrowsums}
\end{eqnarray}
The inner sum in \eqn{eq:fixedbluemodularityrowsums} is a sum across the rows of \( \mat{R} \). Since each row of \( \mat{R} \) consists of a single 1 with all other elements being 0, the modularity is now simple to maximize: we just assign red vertex \( i \) to module \( k \) such that \( \bluemodwtelem{i}{k} \) is the maximum of the \( i \)th row of \( \mat{\tilde{T}} \) \footnote{An arbitrary rule is needed to break ties, for example, random assignment of the vertex to one of the modules that maximizes \( \ensuremath{Q} \).}.

Conversely, if the red vertices are all assigned to modules, maximizing \( \ensuremath{Q} \) consists of assigning the blue vertices to modules. Analogously to the previous case, we define \( \mat{\tilde{R}} = \matrixinnerproduct{\modsubmat}{\mat{R}} \) and manipulate \eqn{eq:defsubmatmodularity} into the form
\begin{equation}
	\ensuremath{Q} = \frac{1}{\numedges} \bluesum{j} \largeparens{\modsum{k} \blueindelem{j}{k} \redmodwtelem{j}{k}}
	\mathpuncspace.
	\label{eq:fixedredmodularityrowsums}
\end{equation}
As with the red vertices, we maximize \( \ensuremath{Q} \) by assigning the \( j \)th blue vertex to the module \( k \) such that \( \redmodwtelem{j}{k} \) is the maximum of the \( j \)th row of \( \mat{\tilde{R}} \).

Taken together, these two maximization procedures define an algorithm that we call BRIM\xspace (bipartite, recursively induced modules). The BRIM\xspace algorithm is an iterative algorithm for maximizing \( \ensuremath{Q} \), with the sets of red and blue vertices each recursively drawing the other into modular structures. For each iteration, \( \ensuremath{Q} \) is guaranteed never to decrease, as it is always possible at least to maintain the previous vertex partitioning and keep the modularity the same. Therefore, the BRIM\xspace algorithm will always find a partition at a maximum of \( \ensuremath{Q} \). In general, the identified partition will correspond to a local maximum in \( \ensuremath{Q} \), not the global maximum.

Note that the BRIM\xspace algorithm can work with the entire \( \modsubmat \) matrix, or a rank-restricted approximation calculated by omitting the smallest singular values. By using the full \( \modsubmat \) matrix, we automatically include all positive contributions to the modularity. As well, the algorithm can work with any assumed number of modules; however, no constraint exists to ensure that each module is occupied.

To test the efficacy of the BRIM\xspace algorithm, we apply it to a simple model network. The model consists of \(N_{\mathrm{mod}}\) modules, each containing \( N_{\mathrm{red}} \) red and \( N_{\mathrm{blue}} \) blue vertices. An edge exists between a red vertex and a blue vertex with probability \( p_{\mathrm{in}} \) if they are in the same module and with probability \( p_{\mathrm{out}} \) if they are in different modules. No edges exist between vertices with the same color.

The qualitative behavior of the model depends on \( p_{\mathrm{in}} \) and \( p_{\mathrm{out}} \). When \( p_{\mathrm{in}} > p_{\mathrm{out}} \), there is a greater probability of vertices within a module being linked than vertices in different modules, matching our intuitive notion of modularity.  With \( p_{\mathrm{in}} \) sufficiently close to one and \( p_{\mathrm{out}} \) small, the actual modular structure of a particular realization of the model should correspond to the assumed modular structure. As \( p_{\mathrm{out}} \rightarrow p_{\mathrm{in}} \), the network becomes more uniform, with the assumed modular structure ultimately vanishing and all vertices belonging to a single module.\footnote{More customary  (see, e.g., Ref.~\citep{DanDiaDucAre:2005}) is to fix the expected degree of the network vertices and vary the expected number of edges linking vertices in different modules, with \(p_{\mathrm{in}}\) and \(p_{\mathrm{out}}\) calculated from the expectation values. However, for the bipartite network model under consideration, the base case, with edges only existing between vertices in the same module, will often be excluded using this approach.} Lower values of \( p_{\mathrm{in}} \) introduce additional substructure into the modules; the general behavior as \( p_{\mathrm{out}} \) varies  should be similar to the previous case, but with an overall reduced correspondence between the assumed modules and the actual modules in networks instantiated from the model.

Following \citet{DanDiaDucAre:2005}, we make precise the above qualitative description in terms of the normalized mutual information \(\ensuremath{I_\mathrm{norm}}\). Consider two schemes \(\ensuremath{X}\) and \(\ensuremath{Y}\) for dividing the \(\ensuremath{n}\) vertices into community groups, represented by two index matrices \(\indmat_{X}\) and \(\indmat_{Y}\) \footnote{Analogous measures can be defined in a straightforward fashion using the portions of the index matrices that correspond to just the red or blue vertices.}.  The two index matrices are used to calculate the so-called confusion matrix \(\mat{N}\), which takes the simple form
\begin{equation}
	\mat{N} = \transpose{\indmat_{X}}\indmat_{Y}
	\label{eq:defconfusionmatrix}
	\mathpuncspace.
\end{equation}
The probability \(\probability{X=x, Y=y}\) that a vertex is assigned to community \(x\) in scheme \(\ensuremath{X}\) and to community \(y\) in scheme \(\ensuremath{Y}\) is proportional to the corresponding element \(\confusionelem{x}{y}\) of the confusion matrix, so that
\begin{equation}
	\probability{X=x, Y=y} = \frac{1}{\ensuremath{n}} \confusionelem{x}{y}
	\label{eq:relateconfusiontoprobability}
	\mathpuncspace.
\end{equation}
Using the probability as defined in \eqn{eq:relateconfusiontoprobability}, we can calculate the normalized mutual information as
\begin{equation}
	\normalizedmutinfo{X}{Y} = \frac{2\mutinfo{X}{Y}}{\entropy{X} + \entropy{Y}}
	\label{eq:defnormmutinfo}
	\mathpuncspace.
\end{equation}
\Eqn{eq:defnormmutinfo} is expressed in terms of the usual mutual information \(\mutinfo{X}{Y}\) and entropies \(\entropy{X}\) and  \(\entropy{X}\) \citep{CovTho:1991}, defined as
\begin{eqnarray}
	\mutinfo{X}{Y} & = & \relentsum{\probability{X, Y}}{\probability{X}\probability{Y}}{x,y} \label{eq:defmutinfo}\\
	\entropy{X} & = & \entropysum{\probability{X}}{x} \label{eq:defentropyx}\\
	\entropy{Y} & = & \entropysum{\probability{Y}}{y} \label{eq:defentropyy}
	\mathpuncspace.
\end{eqnarray}
In \eqns{eq:defnormmutinfo} \througheqn{eq:defentropyy}, we have made use of the common shorthand abbreviations \(\probability{X=x, Y=y} = \probability{X, Y}\), \(\probability{X=x} = \probability{X}\), and \(\probability{Y=y} = \probability{Y}\). The base of the logarithms in \eqns{eq:defmutinfo} \througheqn{eq:defentropyy} is arbitrary, as the computed measures only appear in the ratio in \eqn{eq:defnormmutinfo}.

The normalized mutual information is a measure of the amount of information common to the two partitioning schemes. By taking one of the partitions to be the assumed modular structure of the network and one to be the structure found using the BRIM\xspace algorithm, we can thus explore the efficacy of the algorithm. When the found modules match the real ones, we have \(\ensuremath{I_\mathrm{norm}}=1\), and when the found modules are independent of the real ones, we have \(\ensuremath{I_\mathrm{norm}}=0\).

We now set \(N_{\mathrm{mod}} = 5\), \( N_{\mathrm{red}}  = 12\), and \( N_{\mathrm{blue}} = 8 \), giving \( \ensuremath{n} = 100 \) vertices in the network. With various choices of  \( p_{\mathrm{in}} \) and \( p_{\mathrm{out}} \), we repeatedly instantiate the model network and determine the assignment of vertices to modules using the BRIM\xspace algorithm. The algorithm is initialized by assigning each of the blue vertices to a unique module. For each sample, we calculate \(\ensuremath{I_\mathrm{norm}}\).

In \fig{fig:validatebrim}, we show results of applying the BRIM\xspace algorithm to the model network. The points show the mean value of  \(\ensuremath{I_\mathrm{norm}}\), averaged over 100 instantiations of the network. The error bars show the standard error of the mean. The general behavior is as anticipated, lending confidence to the algorithm definition.

\begin{figure}[htbp]
	\includegraphics[width=\columnwidth]{validate}
	\caption{Agreement between model network modules and modules found using the BRIM\xspace algorithm. Each point shows the mean normalized mutual information between the model network community groups and those identified using the algorithm, averaged over 100 realizations of the model network. Error bars show the standard error of the mean.}
	\label{fig:validatebrim}
\end{figure}

\subsection{Determining the Number of Modules}
\label{sec:num_modules}

The BRIM\xspace algorithm is silent on the issue of how many modules should be used. As noted in \sxn{sec:module_identification_in_bipartite_networks}, the number of modules \( \ensuremath{c} \) is at most one more than the rank of \( \modsubmat \), which is a relatively weak constraint. One approach is thus to assign each vertex of the smaller of the red and blue vertex sets to unique modules, and allow the vertices to be grouped into an appropriate number of modules. For the BRIM\xspace algorithm, said approach is resource intensive, requiring the calculation of modularity contributions for what may be a grossly overestimated number of modules. Worse still, when the number of vertices is much greater than the number of modules, the BRIM\xspace algorithm may terminate at low-quality local maxima far from the true number of modules in the network (see \sxn{sec:scotland} for an example of this).

Clearly, automatically selecting the correct number of allowed modules in such a case would be preferable. The allowed number of modules \( \ensuremath{c} \) thus becomes an adaptable parameter for which a value is to be found that optimizes the modularity. This presents some difficulties in that there is no obvious relationship between the allowed number of modules and the modularity found by the BRIM\xspace algorithm. However, by assuming that the modularity depends on the allowed number of modules in a reasonably smooth fashion, we can use a simple bisection approach to identify an appropriate value for the number of allowed modules.

The search begins by requiring all vertices to belong to the same module, \( \ensuremath{c} = 1 \), giving \( \ensuremath{Q} = 0 \). We double the allowed number of modules \( \ensuremath{c} \).  Half of the vertices are randomly reassigned to the newly defined modules, and a new, locally optimal solution is found using the BRIM\xspace algorithm. This process continues, with \( \ensuremath{c} \) being repeatedly doubled so long as \( \ensuremath{Q} \) continues to increase. Each step in the \( \ensuremath{c} \)-search builds on the previous solution by partially reusing the assignment of vertices to modules.

Once \( \ensuremath{Q} \) drops as \( \ensuremath{c} \) increases, we have crossed a maximum in the modularity landscape. We therefore switch from extrapolating to larger numbers of modules to interpolating within the interval that includes the maximum. The interpolation is done using a simple bisection search in the allowed number of modules, trying new values for \( \ensuremath{c} \) so as to continuously reduce the interval wherein the putative maximum in \( \ensuremath{Q} \) lies. As with the initial extrapolation stage of the search, vertices are assigned from earlier solutions to the newly allowed modules for each value of \( \ensuremath{c} \), and a new, locally optimal solution found.

The search for \( \ensuremath{c} \) terminates once the interval becomes sufficiently small. In this work, we take the interval to be 2, i.e., the \( \ensuremath{Q} \) maximum at \( \ensuremath{c} = \nummodules_\mathrm{max} \) is bracketed by inferior solutions at \( \ensuremath{c} = \nummodules_\mathrm{max} - 1 \) and \( \ensuremath{c} = \nummodules_\mathrm{max} + 1 \).  This adaptive BRIM\xspace algorithm enables us to identify the appropriate number of modules \( \nummodules_\mathrm{max} \) in a number of steps that scales logarithmically with the number of vertices in the network.

\section{Results}\label{sec:results}

In this section, we apply the BRIM\xspace algorithm to a network showing the interactions of women in the American Deep South at various social events \citep{DavGarGar:1941} and to a network showing corporate interlocks in Scottish firms \citep{ScoHug:1980}. Both networks are conveniently available on the World Wide Web in Pajek format \citep{BatMrv:2006}.

\subsection{Southern Women Event Participation}\label{sec:southern_women}

As an initial example, we consider the Southern women data set, collected by \citet{DavGarGar:1941} in and around Natchez, Mississippi during the 1930s as part of an extensive study of class and race in the Deep South. This data set and networks derived from it have been much studied. Indeed, \citet{Fre:2003} has described it as ``\ldots a touchstone for comparing analytic methods in social network analysis.''

The Southern women data set describes the participation of 18 women in 14 social events. The women and social events constitute a bipartite network; an edge exists between a woman and a social event if the woman was in attendance at the event. The network is connected.

We identified network modular structure using the BRIM\xspace algorithm. The initial state is in general important. The dependence on the initial state is most visible in the quality of the stable solution, i.e., the algorithm can get ``stuck'' at a poor quality local maximum. We initialized the assignment of events to modules in  \( \mat{T} \) using several strategies: (1) assigning all events to a single module, (2) assigning each event to its own module, and (3) randomly assigning events to modules.

For this network, all three strategies identify modular structures. The first strategy produces a good quality solution (4 modules, \( \ensuremath{Q} = 0.34554 \)). The second strategy also produces a solution that captures a great deal of the modular structure, but is somewhat coarser than the first (2 modules, \( \ensuremath{Q} = 0.32117 \)). The third strategy, random initial assignment, sheds light on the quality of the first two. Because the network is small, a large number of trials can be run without difficulty; we ran 500,000 trials. The greatest modularity found equalled that found with all events initially in unique modules, \( \ensuremath{Q} = 0.34554 \), indicating that this best solution found is quite good.

In \fig{fig:southernwomengraph}, we show the best assignment of vertices to modules determined using the BRIM\xspace algorithm with all events initially in different modules. The shapes of the vertices show which ones belong to the same modules, with four modules in all. Open symbols with black labels portray vertices corresponding to the women, and filled symbols with white labels portray vertices corresponding to the events. The positions of the vertices are based on the singular vectors corresponding to the two largest singular values of \( \modsubmat \), with the right singular vectors giving the coordinates for the events and the left singular vectors giving the coordinates for the women. Several vertices have been shifted slightly to prevent overlapping vertex symbols while preserving the overall character of the network.

\begin{figure}[htbp]
	\includegraphics[width=\columnwidth]{southernwomen}
	\caption{Modules in the Southern women network. The women are represented as open symbols with black labels and the events as filled symbols with white labels. The modules are indicated by the shape of the symbols. Vertices are positioned with coordinates based on the elements of the singular vectors corresponding to the two largest singular values of \( \modsubmat \); some vertices are repositioned slightly to eliminate overlaps. The vertex partition pictured has the highest modularity we have found for the Southern women network, \( \ensuremath{Q}=0.34554 \)}
	\label{fig:southernwomengraph}
\end{figure}

The community groups found using the BRIM\xspace algorithm are comparable to those found in previous investigations of the Southern women data set (Ref.~\cite{Fre:2003} provides a useful survey). Most such studies have focused on the women, leaving the groupings for the events unspecified; we can use the groupings of the women to assign the events to the best modules, as described in \sxn{sec:recursive_identification_of_bipartite_modules}, and calculate modularity values for purposes of comparison. The community groups can be further compared using the normalized mutual information between the various groupings of the women and the best grouping found using the BRIM\xspace algorithm. Values of \(\ensuremath{Q}\) and \(\ensuremath{I_\mathrm{norm}}\) are summarized in \tbl{tab:southernwomen} and discussed in depth below.

\begin{table}
\caption{Comparison of modules in the Southern women network. Where necessary, the modularity values \(\ensuremath{Q}\) are calculated from an optimistic assignment of the events to the best possible modules from a given assignment of the women to modules. Values of the normalized mutual information \(\ensuremath{I_\mathrm{norm}}\) are calculated between the given divisions of the women and the best division found using the BRIM\xspace algorithm.  }\label{tab:southernwomen}
\begin{ruledtabular}
\begin{tabular}{ldd}
	Modules & \multicolumn{1}{c}{\ensuremath{Q}} & \multicolumn{1}{c}{\ensuremath{I_\mathrm{norm}}} \\ \hline
	BRIM\xspace & 0.34554 &  1 \\
	Spectral & 0.32117 & 0.56897 \\
	Davis 1 & 0.31057 & 0.44657 \\
	Davis 2 & 0.31839 & 0.45126 \\
	Doreian & 0.29390 & 0.60766 \\
	Unipartite & 0.21866 & 0.28019 \\
\end{tabular}
\end{ruledtabular}
\end{table}

In the original investigation, \citet{DavGarGar:1941} used general ethnographic knowledge of the community to assign the women to two groups. The groups consisted of women 1--9 and of women 9--18; woman 9 is a secondary member of both groups. To be consistent with the definitions in \sxn{sec:bipartite_modularity}, we must assign this individual to a specific group. The \(\ensuremath{Q}\) and \(\ensuremath{I_\mathrm{norm}}\) values are seen from \tbl{tab:southernwomen} to be similar for both assignments, with the case where woman 9 is grouped with women 10--18 labeled as ``Davis 1'' and the case where woman 9 is grouped with women 1--8 labeled as ``Davis 2.'' The latter division is the same as what \citet{Fre:2003} identified as the consensus from 21 different studies of the Southern women data set. The \(\ensuremath{Q}\) and \(\ensuremath{I_\mathrm{norm}}\) values are reasonably similar to values found for two modules using either the BRIM\xspace algorithm or spectral bipartitioning as discussed in \sxn{sec:module_identification_in_bipartite_networks}, which groups the women into sets \{1--7, 9\} and \{8, 10--18\} (identified in \tbl{tab:southernwomen} with the label ``Spectral'').

\citet{DorBatFer:2004} considered the modular nature of both parts of the network, suggesting several divisions of the women and events. The division with the greatest modularity (given in their Table 4) is characterized in \tbl{tab:southernwomen} with the label ``Doreian.''  Taking just their partitioning of the events into three groups (events 1--5, 6--9, and 10--14) and replacing their partitioning of the women using the approach from \sxn{sec:recursive_identification_of_bipartite_modules}, the modularity can be increased from 0.29390 to 0.32950. This is similar to the best assignment of vertices to modules we described above, with modularity of 0.34554, wherein the additional structure produces a modest, but real, improvement in the modularity.

It is also of interest to compare the community groups obtained for the Southern women network using the bipartite network to those found using an unweighted projection network. Here, we focus on the projection consisting of the eighteen women as vertices, with edges defined by mutual participation in events. The best division we found for the women, discussed above and shown in \fig{fig:southernwomengraph}, actually has a negative value for the standard unipartite modularity; it is thus better to use only a single module containing all eighteen women than the best module found for the bipartite network. Since the modules we identified from the bipartite network using the BRIM\xspace algorithm are similar to those found in numerous other studies, this highlights the difficulties that can arise using a unipartite projection.

Conversely, we can determine the bipartite modularity for community groups found using the unipartite projection. We first use the Newman vector to partition the women into two groups as described in \sxn{sec:spectral_methods_for_module_identification}, with women 2 and 4--7 in one group and all others in a second group. Next, we determine the best assignment of events to modules using the approach from \sxn{sec:recursive_identification_of_bipartite_modules}. Together, this gives the values shown in \tbl{tab:southernwomen} for the label ``Unipartite,'' which reflect that some of the modular structure of the network has been captured but is generally inferior to the solutions found from the bipartite network. Further, the solution from the unweighted projection does not correspond to a maximum in the bipartite modularity; using the solution as the initial state for the BRIM\xspace algorithm, a solution is obtained with two modules identical to those found using spectral bipartitioning as described in \sxn{sec:module_identification_in_bipartite_networks}.

\subsection{Scotland Corporate Interlock}\label{sec:scotland}

As a second example, we consider a data set on corporate interlocks in Scotland in the early twentieth century \citep{ScoHug:1980}. The data set characterizes 108 Scottish firms during 1904-5, detailing the corporate sector, capital, and board of directors for each firm. The data set includes only those board members who held multiple directorships, totaling 136 individuals.

Here, we focus on the bipartite network of firms and directors, with edges existing between each firm and its board members. Unlike the Southern women network, the Scotland corporate interlock network is not connected. In the following, we consider only the largest component of the graph, containing 131 directors and 86 firms---and thus, as many as 86 modules.

As with the Southern women network, assigning all directors to unique modules or to the same module results in a solution that captures some of the modular character of the network, with \( \ensuremath{Q} = 0.56634 \) and \( \ensuremath{Q} = 0.39873 \), respectively. However, in contrast to the Southern women network, these are rather poor solutions to what can be found starting from a random assignment of directors to modules (see \fig{fig:brim_results}).

Further, the best solutions are found by restricting the allowed number of modules \( \ensuremath{c} \) to less than the maximum. In principle, allowing the number of modules to take on any size leaves the BRIM\xspace algorithm to search the largest possible space, potentially finding the largest possible modularity value. In practice, the results are inferior to those obtained from a more restricted search.  In \fig{fig:brim_results}, we show the results, in terms of the actual numbers of modules occupied and modularity values, for BRIM\xspace searches with the allowed number of modules restricted. This trades off the possibility of higher modularity values in the excluded region for improved searching in the remaining region. The trade-off is clearly a good one, as the best solutions are found with fewer than thirty modules.

In \fig{fig:brim_results}, we also show three runs of the adaptive BRIM\xspace algorithm described in \sxn{sec:num_modules}. The lines show the progress of the number of modules and modularity value during the search. The number of modules \( \ensuremath{c} \) allowed for the BRIM\xspace search is typically close (within 10\%) to the number of modules actually found, suggesting that the adaptive approach eliminates a wasteful search through vertex assignments with too many modules. The three traces all show typical behavior and lead to good solutions; two of the adaptive runs lead to better solutions, in terms of modularity, than any of the much larger number of trials using BRIM\xspace with a fixed \( \ensuremath{c} \).

\begin{figure}[htbp]
	\includegraphics[width=\columnwidth]{brim_results}
	\caption{Quality of solutions found in the Scotland corporate interlock network. The modularity \( \ensuremath{Q} \) depends on the allowed number of modules \( \ensuremath{c} \). The points correspond to solutions found using the BRIM\xspace algorithm starting from a random initial assignment of vertices to modules. The values on the ordinate indicate the number of modules occupied by at least one vertex in the solution state found by the BRIM\xspace algorithm. All points are slightly dithered to better show regions with many similar or identical solutions.  The lines show the course of an adaptive search for the correct number of modules to maximize the modularity, terminating at states with the modularity and number of modules shown by the crosses.}
	\label{fig:brim_results}
\end{figure}

Based on the solutions shown in \fig{fig:brim_results}, the main component of the Scotland corporate interlock network has roughly twenty community groups, considerably fewer than the 131 directors or 86 firms. This analysis could serve as a starting point for an investigation of the community structures of the firms or directors. A more comprehensive analysis would take into account the available information on the corporate sectors and capital of the firms.

\section{Conclusions}\label{sec:conclusions}

We have defined and explored a modularity appropriate for bipartite networks. The presented results extend and specialize the matrix-based approach recently reported by \citet{New:2006a} for unipartite networks. The bipartite structure of the network is reflected mathematically in the importance of an asymmetric submatrix \( \modsubmat \) of the full bipartite modularity matrix \( \mat{B} \), with a corresponding emphasis on the singular value decomposition of \( \modsubmat \) instead of the spectral decomposition of \( \mat{B} \). We made use of the properties of \( \modsubmat \) to define an algorithm, BRIM\xspace, for use in identifying network modules. By applying the algorithm to real-world networks, we demonstrated its effectiveness and identified some of its limitations.

The usual unipartite modularity has a limited resolution that depends on the number of edges in the network \citep{ForBar:2007}. The main consequence of the resolution limit is that the modules in large networks may have hidden substructures that require deeper investigations to reveal. Although we have not shown it, we expect that the bipartite modularity introduced in this work has a similar resolution limit, with similar consequences.

One of the key themes in this paper has been that the bipartite structure of the network can be beneficially incorporated into its mathematical description and its computational treatment. This theme was realized in the BRIM\xspace algorithm, where the assignment of vertices to modules in one part of the network, when held fixed, provides a stable modularity landscape in which it is straightforward to partition the vertices of the other part into modules. We expect that the characteristics of other specialized classes of networks could be taken advantage of in an analogous fashion to define appropriate null model networks, modularity measures, and community detection algorithms.

The eigenvalues of the graph Laplacian are closely related to many important properties and invariants of the graph \citep{Chu:1997}. In contrast, relatively little is known about the spectra of  modularity matrices, be they for unipartite or bipartite networks. We are optimistic that the eigenvalues of the modularity matrix usefully relate to important and interesting network properties.

\begin{acknowledgments}

The author thanks Ludwig Streit, Philippe Blanchard, and Thomas Roediger-Schluga for useful comments and suggestions. This work has been supported in part by the European FP6-NEST-Adventure Programme, contract number 028875.

\end{acknowledgments}

\bibliographystyle{apsrev}

Data Analysis, Statistics and Probability (physics.data-an); Statistical Mechanics (cond-mat.stat-mech); Physics and Society (physics.soc-ph)


Congruence of matrix spaces, matrix tuples, and multilinear maps

Abstract: Two matrix vector spaces $V,W\subset \mathbb C^{n\times n}$ are said to be equivalent if $SVR=W$ for some nonsingular $S$ and $R$. These spaces are congruent if $R=S^T$. We prove that if all matrices in $V$ and $W$ are symmetric, or all matrices in $V$ and $W$ are skew-symmetric, then $V$ and $W$ are congruent if and only if they are equivalent. Let $F: U\times\dots\times U\to V$ and $G: U'\times\dots\times U'\to V'$ be symmetric or skew-symmetric $k$-linear maps over $\mathbb C$. If there exists a set of linear bijections $\varphi_1,\dots,\varphi_k:U\to U'$ and $\psi:V\to V'$ that transforms $F$ to $G$, then there exists such a set with $\varphi_1=\dots=\varphi_k$.

\section{Introduction and main results}

If two pairs of complex $n\times n$ matrices $(M,M')$ and $(N,N')$ are congruent, then they are equivalent; that is,
\begin{align*}
\exists &\text{ nonsingular } S:\ S(M,M')S^T:=(SMS^T,SM'S^T)=(N,N')\\
\Longrightarrow\quad
\exists &\text{ nonsingular }  P\text{ and } Q:\ P(M,M')Q=(N,N').
\end{align*}
Mal'cev
writes in \cite[Chapter VI]{mal} that quite unexpectedly the converse is also true under certain conditions:
\begin{equation}
\label{bgm}
\parbox[c]{0.84\textwidth}
{\emph{Let $M$ and $N$ be either both symmetric or both skew-symmetric, and let $M'$ and $N'$ be either both symmetric or both skew-symmetric. If $(M,M')$ and $(N,N')$ are equivalent, then they are congruent.}}
\end{equation}

Since each square complex matrix $A$ can be expressed as the sum of the symmetric matrix $(A+A^T)/2$ and the skew-symmetric matrix$(A-A^T)/2$, the statement \eqref{bgm} implies that
\begin{equation}
\label{bgvm}
\parbox[c]{0.84\textwidth}
{two complex matrices $A$ and $B$ are congruent if and only if $(A,A^T)$ and $(B,B^T)$ are equivalent.}
\end{equation}
This fact admits to derive
a canonical form of complex matrices under congruence from the Kronecker canonical form of matrix pencils; see \cite[Section 2]{h-s1}.
The statement \eqref{bgvm} is extended in \cite{roi,ser} (see also \cite{h-s1,h-s2,ser1})  to arbitrary systems of forms and linear maps.

If $(A,A^T)$ and $(B,B^T)$ are equivalent, then $P(A,A^T)Q=(B,B^T)$ for some nonsingular $P$ and $Q$, and so $(PAQ,Q^TAP^T)=(B,B)$. Taking $R:=Q^T$, we rewrite \eqref{bgvm} as follows: \begin{equation}
\label{bkm}
\parbox[c]{0.84\textwidth}
{two complex matrices $A$ and $B$ are congruent if and only if $PAR^T=RAP^T=B$ for some nonsingular $P$ and $R$.}
\end{equation}

This paper is a continuation of the article \cite{bel-ser_mul}, in which the statement \eqref{bkm} is extended to multilinear forms.
We extend \eqref{bkm} to matrix spaces, matrix tuples, and multilinear maps.
The main results are Theorem \ref{t1h} about congruence of matrix tuples and Theorem \ref{ther} about congruence of $k$-linear maps. In Remark \ref{bvc} we show that Theorem \ref{ther} in the case of bilinear maps (i.e., for $k=2$) follows from Theorem \ref{t1h}.

\subsection{Matrix tuples up to congruence and *congruence}
\label{s1.2a}

Let $\ff$ be a field or skew field with a fixed \emph{involution} $a\mapsto \bar a$; that is, a bijection $\ff\to\ff$   (which can be the identity if $\ff$ is a field)
such that $\overline{a+b}=\bar a+\bar b$,
$\overline{ab}=\bar b\bar a$, and $\bar{\bar
a}=a$ for all $a,b\in\ff$. If $A$ is a matrix over $\ff$, then $A^*:=\bar A^T$.

\begin{definition}\label{nhj}
Two $t$-tuples
\[\mc A=(A_1,\dots,A_t),\qquad \mc B=(B_1,\dots,B_t)\]
of $n\times n$ matrices over $\ff$ are
\begin{itemize}
  \item  \emph{symmetrically equivalent} if
$S\mc AR^T=R\mc AS^T=\mc B$,

  \item   \emph{*symmetrically equivalent} if
$S\mc AR^*=R\mc AS^*=\mc B$,

  \item \emph{congruent} if
$S\mc AS^T=\mc B$, and
\emph{*congruent} if
$S\mc AS^*=\mc B$
\end{itemize}
for some nonsingular $S$ and $R$.
\end{definition}

Recall that a \emph{real closed field} $\pp$ is a field whose algebraic closure is two-dimensional over $\pp$; for example, $\pp=\rr$. The characteristic of each real closed field is zero.

Let $p,q\in\{0,1,2,\dots\}$.
A \emph{$(p,q)$
block diagonal matrix} is a matrix of the form
\[
\mat{A&0\\0&B},\qquad
\begin{matrix}
A\text{ is }p\times p,\\
B\text{ is }q\times q.\\
\end{matrix}
\]

The following theorem generalizes \eqref{bkm}.

\begin{theorem}[proved in Section \ref{s2}]\label{t1h}
Let $\mc A$ and $\mc B$ be two
$t$-tuples
of $n\times n$ matrices over $\mathbb F$.

\begin{itemize}
  \item[\rm(a)]
Let $\ff$ be an algebraically closed field of characteristic different from $2$. Then ${\mc A}$ and ${\mc B}$ are symmetrically equivalent if and only if they are  congruent.

  \item[\rm(b)]
Let $\ff$ be a real closed field. Then ${\mc A}$ and ${\mc B}$ are symmetrically equivalent if and only if there exists a $t$-tuple $\mc C$ of $(p,n-p)$ block diagonal matrices such that $\mc A$ is congruent to $\mc C$ and $(I_p\oplus -I_{n-p})\mc C$
is congruent to ${\mc B}$.

\item[\rm(c)]
Let $\ff$ be an algebraically closed field or the skew field of real quaternions. Let a nonidentity involution on $\ff$ be fixed. Then ${\mc A}$ and ${\mc B}$ are *symmetrically equivalent if and only if
there exists a $t$-tuple $\mc C$ of $(p,n-p)$ block diagonal matrices such that $\mc A$ is *congruent to $\mc C$ and $(I_p\oplus -I_{n-p})\mc C$
is *congruent to ${\mc B}$.
\end{itemize}
\end{theorem}

\subsection{Matrix tuples up to weak congruence and *congruence}
\label{s1.2b}

\begin{definition}\label{nmj}
Let $\ff$ be a field.
Two $t$-tuples
$\mc A$ and $\mc B$
of $n\times n$ matrices over $\ff$ are
\emph{weakly symmetrically equivalent}, \emph{weakly *symmetrically equivalent}, \emph{weakly symmetrically congruent}, or \emph{weakly symmetrically *congruent} if there exists a nonsingular $t\times t$ matrix $\Lambda=[\lambda_{ij}]$ over $\mathbb F$ such that $\mc A$ is symmetrically equivalent,  *symmetrically equivalent, symmetrically congruent, or  symmetrically *congruent to the $t$-tuple
\begin{equation}\label{mjg}
\mc C:=(\lambda_{11}B_1
+\dots+\lambda_{1t}B_t,\ \dots,\ \lambda_{t1}B_1
+\dots+\lambda_{tt}B_t).
\end{equation}
\end{definition}

If
$\mc A$ and $\mc B$
are weakly *symmetrically equivalent, then $\mc A$ is *symmetrically equivalent to $\mc C$ of the form \eqref{mjg}. By Theorem \ref{t1h}, $\mc A$ is *congruent to $\mc C$, and so $\mc A$ and $\mc B$
are weakly *congruent, which ensures the following corollary.

\begin{corollary}[of Theorem \ref{t1h}]\label{t1n1}
Let $\mc A$ and $\mc B$ be two
$t$-tuples
of $n\times n$ matrices over $\mathbb F$.

\begin{itemize}
  \item[\rm(a)]
Let $\ff$ be an algebraically closed field of characteristic different from $2$. Then ${\mc A}$ and ${\mc B}$ are weakly  symmetrically equivalent if and only if they are weakly  congruent.

  \item[\rm(b)]
Let $\ff$ be a real closed field. Then ${\mc A}$ and ${\mc B}$ are weakly symmetrically equivalent if and only if there exists a $t$-tuple $\mc C$ of $(p,n-p)$ block diagonal matrices such that $\mc A$ is congruent to $\mc C$ and $(I_p\oplus -I_{n-p})\mc C$
is weakly  congruent to ${\mc B}$.

\item[\rm(c)]
Let $\ff$ be an algebraically closed field with a fixed nonidentity involution. Then ${\mc A}$ and ${\mc B}$ are weakly *symmetrically equivalent if and only if
there exists a $t$-tuple $\mc C$ of $(p,n-p)$ block diagonal matrices such that $\mc A$ is *congruent to $\mc C$ and $(I_p\oplus -I_{n-p})\mc C$
is weakly *congruent to ${\mc B}$.
\hfill\hbox{\qedsymbol}
\end{itemize}
\end{corollary}

\begin{remark}\label{co1d}
The word ``symmetrically'' in (a) and (b) of Theorem \ref{t1h} and Corollary \ref{t1n1} can be deleted if the matrices in $\mc A$ and $\mc B$ are all symmetric or all skew-symmetric. The word ``*symmetrically'' in (c) can be deleted if the matrices in $\mc A$ and $\mc B$ are all Hermitian.
\end{remark}

The problem of classifying matrix $t$-tuples up to weak congruence arises in many branches of mathematics:
\begin{itemize}
  \item In multilinear algebra: if $U$ and $V$ are vector spaces with bases $e_1,\dots,e_n$ and $f_1,\dots,f_t$, then each bilinear map $\mc F:U\times U\to V$ is given by a $t$-tuple $(A_1,\dots,A_t)$ of $n\times n$ matrices as follows:
\[
\mc F(x,y)=([x]_e^TA_1[y]_e)f_1
+\dots+ ([x]_e^TA_t[y]_e)f_t
\]
in which $[x]_e$ and $[y]_e$ are the coordinate vectors of $x,y\in U$. We can reduce $(A_1,\dots,A_t)$ by transformations of weak congruence changing the bases in $U$ and $V$.

  \item In the theory of tensors:  by \cite{fut1}, the problem of classifying matrix $t$-tuples up to weak equivalence contains the problem of classifying
an arbitrary system of tensors of order at most three.

  \item In the theory of groups: each finite $p$-group $G$ of exponent $p\ne 2$ with central commutator subgroup $G'$ is given by a skew-symmetric bilinear map
      \begin{align*}
G/G' \times G/G' &\to G'\\ (g_1G',g_2G')&\mapsto [g_1, g_2]:=g_1^{-1}g_2^{-1}g_1g_2
      \end{align*}
between the vector spaces $G/G'$ and $G'$  over the field $\ff_p$ with $p$ elements, and so $G$ is given by a tuple of skew-symmetric matrices over $\ff_p$ defined up to weak congruence (see \cite[Lemma 5.2]{bel-dm} and \cite{ser_metab}). The problem of classifying nilpotent Chernikov $p$-groups with elementary top also reduces to the problem of classifying tuples of skew-symmetric matrices over $\ff_p$ up to weak congruence; see \cite{dro}.

\item The problem of classifying local commutative algebras (respectively, Lie algebras with central commutator subalgebra) over a field of characteristic different from 2 contains the problem of classifying,   up to weak congruence, of matrix $t$-tuples in which all matrices are symmetric (respectively, skew-symmetric); see \cite[Section 4]{bel-dm} and \cite{bel-lip,fut}.
\end{itemize}

Some classes of matrix 2-tuples are classified up to weak equivalence in \cite{bel-ber1,bel-ber,ehr}.
By \cite{bel-dm,bel-lip}, the problem of classifying matrix 3-tuples up to weak equivalence is wild, and so it contains the problems of classifying each system of linear maps and  representations of each finite dimensional algebra; see \cite{bel-ser_compl} and \cite[Proposition 9.14]{bar}.

\subsection{Matrix spaces up to congruence and *congruence}
\label{s1.1}

\begin{definition}\label{nhz}
Let $\ff$ be a field. Two matrix vector spaces $\mc V,\mc W\subset\ff^{n\times n}$ over $\ff$ are
\emph{equivalent} if
$S\mc VR=\mc W$,
\emph{congruent} if
$S\mc VS^T=\mc W$, and
\emph{*congruent}  with respect to an involution $a\mapsto \bar a$ on $\ff$ if
$S\mc VS^*=\mc W$
for some nonsingular $S$ and $R$.
\end{definition}

\begin{corollary}[of Theorem \ref{t1h}]
\label{t1}
Let $\mc V$ and $\mc W$ be two vector spaces of $n\times n$ matrices over $\mathbb F$.

\begin{itemize}
  \item[\rm(a)]
Let $\ff$ be an algebraically closed field of characteristic different from $2$. Let the matrices of $\mc V$ and $\mc W$ be all symmetric or all skew-symmetric. Then ${\mc V}$ and ${\mc W}$ are equivalent if and only if they are congruent.

  \item[\rm(b)]
Let $\ff$ be a real closed field. Let the matrices of $\mc V$ and $\mc W$ be all symmetric or all skew-symmetric. Then ${\mc V}$ and ${\mc W}$ are equivalent if and only if there exists a space $\mc U$ of $(p,n-p)$ block diagonal matrices such that $\mc V$ is congruent to $\mc U$ and $(I_p\oplus -I_{n-p})\mc U$
is congruent to ${\mc W}$.

\item[\rm(c)]
Let $\ff$ be an algebraically closed field with a fixed nonidentity involution. Let all matrices of $\mc V$ and $\mc W$ be Hermitian. Then ${\mc V}$ and ${\mc W}$ are equivalent if and only if
there exists a space $\mc U$ of $(p,n-p)$ block diagonal Hermitian matrices such that $\mc V$ is *congruent to $\mc U$ and $(I_p\oplus -I_{n-p})\mc U$
is *congruent to ${\mc W}$.
\end{itemize}
\end{corollary}

\begin{proof}
Let us prove (a), the statements (b) and (c) are proved analogously.
Let $\mc V$ and $\mc W$ be equivalent; that is,
$S\mc VR=\mc W$ for some nonsingular matrices $S$ and $R$. Let $A_1,\dots,A_t$ be a basis of $\mc V$.
Then the matrices
\[
B_1:=SA_1R,\ \dots,\ B_t:=SA_tR
\]
form a basis of $\mc W$. The tuples $(A_1,\dots,A_t)$ and $(B_1,\dots,B_t)$ are equivalent, and so they are congruent by Remark \ref{co1d}. Hence, $\mc V$ and $\mc W$ are congruent.
\end{proof}

\subsection{Multilinear maps}
\label{s1.3}

\begin{definition}
Two $k$-linear maps
\begin{equation}\label{8ut}
\mc F: U\times\dots\times U\to V,\qquad\mc G: U'\times\dots\times U'\to V'
\end{equation}
with $k\ge 2$ over a field $\ff$ are
\begin{itemize}
  \item \emph{equivalent} if
there exist linear bijections $\varphi_1,\dots,\varphi_k:U\to U'$ and
$\psi:V\to V'$ such that
\begin{equation}\label{jnd7}
\forall u_1,\dots,u_k\in U:\ \mc G(\varphi_1u_1,
\dots,\varphi_ku_k )=\psi \mc F(u_1,\dots,u_k),
\end{equation}
which means that the diagram
\[
\xymatrix@C=30pt{
U\ar[d]_{\varphi_1}
\ar@{}[r]|{\hspace{-25pt}
{\displaystyle\times\dots\times}
\hspace{-25pt}}
&U\ar[d]_{\varphi_k}
\ar[rr]^{\mc F}&&V
\ar[d]_{\psi}
                           \\
U'\ar@{}[r]|{\hspace{-25pt}
{\displaystyle\times\dots\times}
\hspace{-25pt}}
&U'\ar[rr]^{\mc G}&&V'
}
\]
is commutative;

  \item
\emph{symmetrically equivalent}
if there exist linear bijections $\varphi_1,\dots,\varphi_k:U\to U'$ and
$\psi:V\to V'$ such that
\begin{equation}\label{jnd}
\forall \sigma \in S_k,\, u_1,\dots,u_k\in U:\ \mc G(\varphi_{\sigma(1)}u_1,
\dots,\varphi_{\sigma(k)}u_k )=\psi \mc F(u_1,\dots,u_k),
\end{equation}
in which $S_k$ is the permutation group;

  \item \emph{congruent} if
there exist linear bijections $\varphi:U\to U'$ and
$\psi:V\to V'$ such that
\begin{equation}\label{jnd8}
\forall u_1,\dots,u_k\in U:\ \mc G(\varphi u_1,
\dots,\varphi u_k )=\psi \mc F(u_1,\dots,u_k).
\end{equation}
\end{itemize}
\end{definition}
The \emph{direct sum} of  $k$-linear maps
\eqref{8ut} is the $k$-linear map
\begin{align*}
\mc F\oplus \mc G: (U\oplus U')\times\dots\times (U
\oplus U')&\to V\oplus V'\\
(u_1+u'_1,\dots,u_k+u'_k)
&\mapsto\mc F(u_1,\dots,u_k)+
\mc G(u'_1,\dots,u'_k).
\end{align*}
A $k$-linear map $\mc F: U\times\dots\times U\to V$ with $k
 \ge 2$ is
\emph{symmetric} (respectively, \emph{skew-symmetric}) if
\begin{equation*}\label{7yt}
\mc F(u_1,\dots,u_{i-1},
u_j,u_{i+1},\dots,
u_{j-1},
u_i,u_{j+1},\dots,u_k)
\end{equation*}
is equal to $\mc F(u_1,\dots,u_k)$ (respectively, $-\mc F(u_1,\dots,u_k)$)
for all $i,j\in\{1,\dots,k\}$ with $i<j$ and all $u_1,\dots,u_k\in U$.

The following theorem  generalizes \cite[Theorem 2]{bel-ser_mul}
about $k$-linear forms (i.e., with $\ff$ instead of $V$ and $V'$).

\begin{theorem}[proved in Section \ref{s4}]\label{ther}
Let
\[
\mc F: U\times\dots\times U\to V,\qquad\mc G: U'\times\dots\times U'\to V'
\]
be two $k$-linear maps with $k\ge 2$ over $\ff$.

\begin{itemize}
  \item[\rm(a)] Let $\ff$ be an algebraically closed field of characteristic different from $2$. Then
$\mc F$ and $\mc G$
over $\ff$ are symmetrically
equivalent if and only if they are  congruent. In particular,
if $\mc F$ and $\mc G$ are both symmetric or both skew-symmetric, then they are equivalent if and only if they are congruent.

  \item[\rm(b)]
Let $\ff$ be a real closed field. Then $\mc F$ and $\mc G$ are symmetrically equivalent if and only if there exists a
$k$-linear map $\mc H\oplus \mc K$  such that
$\mc F$ is congruent to
$\mc H\oplus \mc K$ and $\mc H\oplus -\mc K$
is congruent to $\mc G$.

\end{itemize}
\end{theorem}

\section{Proof of Theorem \ref{t1h}}
\label{s2}

We prove Theorem \ref{t1h} by the method that is developed in
\cite{ser}, described in details in \cite{ser1}, and is used in \cite{h-s2,hor-ser} and other articles. The reader is expected to be familiar with it. In order to better understand the nature of Theorem \ref{t1h},  in the next section we also give a direct proof of the statement (a).

The method developed in
\cite{ser} reduces the
problem of classifying systems of linear
maps and forms to the problem of
classifying systems of linear maps. Bilinear and sesquilinear forms, pairs of
symmetric, skew-symmetric, and Hermitian
forms, unitary and selfadjoint operators on
a vector space with indefinite scalar product
are classified in \cite{ser} over a field $\mathbb F$ of characteristic $\ne 2$ up to
classification of Hermitian forms over
finite extensions of $\mathbb F$ (and so they are fully classified over $\rr$ and
$\cc$).

Let $\ff$ be a field or skew field with a fixed involution $a\mapsto\bar a$. Each finite system consisting of vector spaces over $\ff$, and linear maps and sesquilinear (bilinear if $a\mapsto\bar a$ is the identity) forms between these spaces is considered in \cite{ser} as a representation of a graph with undirected and directed edges. Its vertices represent vector spaces, its undirected edges represent forms, and its directed edges represent linear maps. We give all forms and linear maps by their matrices if all the vector spaces are of the form $\ff^k$ with $k\in\{0,1,2,\dots\}$.

Let $\mc A=(A_1,\dots,A_t)$ and $\mc B=(B_1,\dots,B_t)$ be two
$t$-tuples
of $n\times n$ matrices over $\mathbb F$. Consider the corresponding representations \begin{equation}\label{ccn3}
\begin{split}
\xymatrix{{}\\{\mc A}:}\ \ \xymatrix{&{}\\
{\ff^n} \ar@{}[ur]|{\displaystyle \ddots}
\ar@{-}@(dl,l)^{A_1}
\ar@{-}@(l,ul)^{A_2}
\ar@{-}@(ul,u)^{A_3}
\ar@{-}@(r,rd)^{A_t}&{}
}
\qquad\qquad\qquad
\xymatrix{{}\\{\mc B}:}\ \ \xymatrix{&{}\\
{\ff^n} \ar@{}[ur]|{\displaystyle \ddots}
\ar@{-}@(dl,l)^{B_1}
\ar@{-}@(l,ul)^{B_2}
\ar@{-}@(ul,u)^{B_3}
\ar@{-}@(r,rd)^{B_t}&{}
}
\end{split}
\end{equation}
of the graph
\begin{equation*}\label{yyy3}
\begin{split}
\xymatrix{{}\\G:}\ \ \xymatrix{&{}\\
u \ar@{}[ur]|{\displaystyle \ddots}
\ar@{-}@(dl,l)^{\alpha_1}
\ar@{-}@(l,ul)^{\alpha_2}
\ar@{-}@(ul,u)^{\alpha_3}
\ar@{-}@(r,rd)^{\alpha_t}&{}
}\end{split}
\end{equation*}
with $t$ undirected loops. All matrices $A_i$ and $B_i$ in \eqref{ccn3} represent sesquilinear (bilinear if $a\mapsto\bar a$ is the identity) forms on the vector space $\ff^n$. The representations \eqref{ccn3}
are isomorphic if there exists a nonsingular matrix $S\in\ff^{n\times n}$ such that
\begin{equation*}\label{ewm3}
S^{\st}(A_1,\dots,A_t)S
=(B_1,\dots,B_t)
\end{equation*}
in which $S^{\st}:=S^T$ if $a\mapsto\bar a$ is the identity, and  $S^{\st}:=S^*$ if $a\mapsto\bar a$ is nonidentity.

The representations \eqref{ccn3} define the representations
\begin{equation}\label{6yr}
\un{\mc A}:\
\xymatrix@C=55pt{\ff^n
 \ar@/_/[r]_{A_1^{\st}}
 \ar@/_30pt/[r]_{A_t^{\st}}^{\cdots}
 \ar@/^/[r]^{A_1}
\ar@/^25pt/[r]^{A_t}_{\ldots}
&\ff^n}
\qquad\qquad\qquad
\un{\mc B}:\
\xymatrix@C=55pt{\ff^n
 \ar@/_/[r]_{B_1^{\st}}
 \ar@/_30pt/[r]_{B_t^{\st}}^{\cdots}
 \ar@/^/[r]^{B_1}
\ar@/^25pt/[r]^{B_t}_{\ldots}
&\ff^n}
\end{equation}
of the quiver with involution
\begin{equation*}\label{yyd}
\un G:\ \xymatrix@C=55pt{u
 \ar@/_/[r]_{\alpha_1^*}
 \ar@/_30pt/[r]_{\alpha_t^*}^{\cdots}
 \ar@/^/[r]^{\alpha_1}
\ar@/^25pt/[r]^{\alpha_t}_{\ldots}
&u^*}
\end{equation*}

Applying \cite[Theorem 1]{ser} (or \cite[Theorem 3.1]{ser1}) to representations of $G$ and $\un G$, we obtain the following:
\begin{itemize}
  \item[(A)] If\/ $\ff$ is an algebraically closed field of characteristic different from $2$, then $\mc A$ is isomorphic to $\mc B$ if and only if $\un{\mc A}$ is isomorphic to $\un{\mc B}$.

  \item[(B)] Let $\ff$ be an algebraically closed field with a fixed nonidentity involution, or a real closed field, or the skew field of quaternions over $\rr$ with a fixed nonidentity involution.
      \begin{itemize}
        \item

        Each representation of $G$ is uniquely, up to isomorphisms of summands, decomposes into a direct sum of indecomposable representations.

        \ite
        If $\mc A$ is an indecomposable representation of $G$ and $\un{\mc A}$ is isomorphic to $\un{\mc B}$, then ${\mc A}$ is isomorphic to $\mc B$ or $-\mc B$.
      \end{itemize}
\end{itemize}

By the statement (B), if $\un{\mc A}$ is isomorphic to $\un{\mc B}$ and $\mc A$ is isomorphic to a direct sum $\mc A_1\oplus\dots\oplus \mc A_r$ of indecomposable representations, then the direct summands can be renumbered such that $\mc B$ is isomorphic to
$\mc A_1\oplus\dots\oplus\mc A_s \oplus-\mc A_{s+1}\oplus\dots\oplus-\mc A_r$,
in which $0\le s\le r$.

The representations \eqref{6yr} are isomorphic if there exist nonsingular matrices $P$ and $Q$ such that
\[
P(A_1,\dots,A_t,A_1^{\st}, \dots,A_t^{\st})Q=
(B_1,\dots,B_t,B_1^{\st}, \dots,B_t^{\st});
\]
that is, $P\mc A Q=\mc B$ and
$P\mc A^{\st} Q=\mc B^{\st}$.
By the last equality, $Q^{\st} \mc AP^{\st} =\mc B$. If $R:=Q^{\st}$, then
$P\mc A R^{\st}=R\mc AP^{\st} =\mc B$, which means that the matrix $t$-tuples $\mc A$ and $\mc B$ are symmetrically equivalent if the involution $a\mapsto\bar a$ is the identity, and they are symmetrically *equivalent if $a\mapsto\bar a$ is nonidentity.
Therefore, Theorem \ref{t1h} follows from (A) and (B).

\section{Direct proof of Theorem \ref{t1h}(a)}
\label{s3}

Let $\ff$ be an algebraically closed field of characteristic different from $2$. Suppose that two matrix $t$-tuples
$\mc A=(A_1,\dots,A_t)$ and $\mc B=(B_1,\dots,B_t)$ are symmetrically equivalent; that is, $P\mc AR^T=R\mc AP^T=\mc B$ for some nonsingular $P$ and $R$. Thus, $PA_iR^T=RA_iP^T=B_i$,
and so $P(A_i,A_i^T)R^T=(B_i,B_i^T)$ for each $i\in\{1,\dots,t\}$.

Let $Q:=(R^T)^{-1}$, then $P(A_i,A_i^T)=(B_i,B_i^T)Q$
and the diagram
\[
    \xymatrix@C=55pt@R=25pt{
{\circ}\ar@<-2pt>[d]_{A_i}
\ar@<2pt>[d]^{A^T_i}
\ar[r]^{Q}
&{\circ}\ar@<-2pt>[d]_{B_i}
\ar@<2pt>[d]^{B^T_i}
                      \\
{\circ}\ar[r]_{P}&{\circ}}
\]
is commutative.
Define the pair $(C_i,C_i^T)$ as follows:
\begin{equation}\label{asq}
\begin{split}
    \xymatrix@C=60pt@R=35pt{
{\circ}\ar@<-2pt>[d]_{A_i}
\ar@<2pt>[d]^{A^T_i}
\ar[r]_{Q}
\ar@/^1pc/@{-->}[rr]^{I_n}
&{\circ}\ar@<-2pt>[d]_{B_i}
\ar@<2pt>[d]^{B^T_i}
\ar[r]_{Q^{-1}}
&{\circ}\ar@<-2pt>[d]_{C_i}
\ar@<2pt>[d]^{C^T_i}
     &
\ar@{}[d]|{\qquad\qquad\displaystyle
\begin{aligned}
 C_i:=&Q^TB_iQ\\
 C_i^T\!=&Q^TB^T_iQ\\
 R:=&Q^TP
\end{aligned}
}
                      \\
{\circ}\ar[r]^{P}
\ar@/_1pc/@{-->}[rr]_{R}
&{\circ}
\ar[r]^{Q^T}&{\circ}
     &
}
\end{split}
\end{equation}
and obtain the commutative diagram
\begin{equation*}\label{jjj}
    \xymatrix@C=60pt@R=25pt{
{\circ}\ar@<-2pt>[d]_{A_i}
\ar@<2pt>[d]^{A^T_i}
\ar[r]^{I_n}
&{\circ}\ar@<-2pt>[d]_{C_i}
\ar@<2pt>[d]^{C^T_i}
\ar[r]^{R^T}
&{\circ}\ar@<-2pt>[d]_{A_i}
\ar@<2pt>[d]^{A^T_i}
                      \\
{\circ}\ar[r]_{R}
&{\circ}
\ar[r]_{I_n}&{\circ}}
\end{equation*}
Therefore,
\begin{equation*}\label{fff}
\begin{split}
    \xymatrix@C=60pt@R=25pt{
{\circ}\ar[d]_{A_i}
\ar[r]^{R^T}
&{\circ}\ar[d]^{A_i}
                      \\
{\circ}\ar[r]_{R}
&{\circ}}
              \qquad
\xymatrix@C=60pt@R=25pt
{{}\ar@{}[d]|
{\displaystyle\text{and so}}\\{}}
              \qquad
    \xymatrix@C=60pt@R=25pt{
{\circ}\ar[d]_{A_i}
\ar[r]^{f(R^T)}
&{\circ}\ar[d]^{A_i}
                      \\
{\circ}\ar[r]_{f(R)}
&{\circ}}
\end{split}
\end{equation*}
for each polynomial $f\in\mathbb F[x]$.

Since $A_iR^T=C_i$,
the diagram
\begin{equation*}\label{ddb}
\begin{split}
    \xymatrix@C=60pt@R=30pt{
{\circ}\ar[d]_{A_i}
\ar[r]_{f(R^T)}
\ar@/^1pc/@{-->}[rr]^{R^{-T}f(R^T)}
&{\circ}\ar[d]_{A_i}
\ar[r]_{R^{-T}}
&{\circ}\ar[d]^{C_i}
                      \\
{\circ}\ar[r]^{f(R)}
\ar@/_1pc/@{-->}[rr]_{f(R)}
&{\circ}
\ar[r]^{I_n}&{\circ}}
\end{split}
\end{equation*}
is commutative. Hence $f(R)A_i=C_i\bigl(R^{-T}f(R^T) \bigr)$ and
\[C_i=f(R)A_i
\bigl(R^{-T}f(R^T)\bigr)^{-1}
=f(R)A_i\bigl(Rf(R)^{-1}\bigr)^{T}.\]

By \cite[Section VIII, \S\,6]{gan} or \cite[Section 6.4]{horn}, there exists $f\in\mathbb F[x]$ such that
$f(R)^{2}=R$. Since $R$ is nonsingular, $f(R)$ is nonsingular too, $f(R)=Rf(R)^{-1}$, and $C_i=f(R)A_if(R)^{T}$. By \eqref{asq}, $B_i=Q^{-T}C_iQ^{-1}
=Q^{-T}f(R)A_if(R)^{T}Q^{-1}$. Taking $S:=Q^{-T}f(R)$, we obtain $B_i=SA_iS^T$. The matrix $S$ is the same for all $A_1,\dots,A_t$. Therefore, $\mc B=S\mc AS^T$, i.e. $\mc A$ is congruent to $\mc B$.

\section{Proof of Theorem \ref{ther}}
\label{s4}

\begin{definition}
Let $\mathscr  F:=(\mc F_1,\dots,\mc F_t)$ and $\mathscr  G:=(\mc G_1,\dots,\mc G_t)$ be two $t$-tuples of $k$-linear forms
\begin{equation}\label{gvt2}
\mc F_1,\dots,\mc F_t: U\times\dots\times U\to \ff,\qquad\mc G_1,\dots,\mc G_t: U'\times\dots\times U'\to \ff
\end{equation}
on vector spaces $U$ and $U'$ over a field $\ff$. We say that
$\mathscr  F $ and $\mathscr  G$ are
\begin{itemize}
  \item
\emph{symmetrically equivalent}
if there exist linear bijections $\varphi_1,\dots,\varphi_k:U\to U'$ such that
\begin{equation}\label{jndn}
\forall \sigma \in S_k,\, u_1,\dots,u_k\in U:\ \mc G_{\ell}(\varphi_{\sigma(1)}u_1,
\dots,\varphi_{\sigma(k)}u_k )= \mc F_{\ell}(u_1,\dots,u_k)
\end{equation}
for each $\ell=1,\dots,t$;

  \item
\emph{congruent} if
there exists a linear bijection $\varphi:U\to U'$ such that
\begin{equation}\label{jndj}
\forall u_1,\dots,u_k\in U:\ \mc G_{\ell}(\varphi u_1,
\dots,\varphi u_k )=\mc F_{\ell}(u_1,\dots,u_k)
\end{equation}
for each $\ell=1,\dots,t$.
\end{itemize}
\end{definition}

Let $\mc G: V\times\dots \times V\to \ff$ be a $k$-linear form. A linear map $\tau:
V\to V$ is \emph{$\mc G$-selfadjoint} if
\begin{equation*}\label{5}
\mc G(v_1\dots,v_{i-1}, \tau
v_i,v_{i+1}\dots,v_n)=
\mc G(v_1\dots,v_{j-1},\tau
v_j,v_{j+1}\dots,v_n)
\end{equation*}
for all $v_1,\dots,v_n\in V$ and all
$i,j$.

The proof of Theorem \ref{ther} is based on the following theorem, which is given in  \cite[Theorems 2(a) and 3]{bel-ser_mul} for $t=1$.

\begin{theorem}\label{prop}
Let $\mathscr  F=(\mc F_1,\dots,\mc F_t)$ and $\mathscr G=(\mc G_1,\dots,\mc G_t)$ be two $t$-tuples of $k$-linear forms \eqref{gvt2} over $\ff$.

\begin{itemize}
  \item[\rm(a)]
Let $\ff$ be an algebraically closed field of characteristic different from $2$. Then $\mathscr  F$ and $\mathscr  G$ are symmetrically equivalent  if and only if they are congruent.

\item[\rm(b)]
Let $\ff$ be a real closed field. Then $\mathscr  F$ and $\mathscr  G$ are symmetrically equivalent if and only if there exists a $t$-tuple $\mathscr  H\oplus \mathscr  K$  of $k$-linear forms such that
$\mathscr  F$ is congruent to
$\mathscr  H\oplus \mathscr  K$ and $\mathscr  H\oplus -\mathscr  K$
is congruent to $\mathscr  G$.
\end{itemize}
\end{theorem}

\begin{proof}
(a) Let us show that this statement can be proved as \cite[Theorem 2(a)]{bel-ser_mul}. Let $\mathscr  F$ and $\mathscr  G$ be symmetrically equivalent; that is, there exist linear bijections $\varphi_1,\dots,\varphi_k:U\to U'$ satisfying \eqref{jndn}. Let $\varphi_1=\dots=\varphi_r\ne \varphi_{r+1}$ for some $r<k$.
It suffices to prove that $\varphi_1,\dots,\varphi_k$ in \eqref{jndn} can be replaced by $\psi_1,\dots,\psi_k$ such that
\begin{equation}\label{bnu}
\psi_1=\dots=\psi_{r+1}.
\end{equation}
We have
\begin{equation}\label{4}
  \mc G_{\ell}(\dots,\varphi_r u_i,\dots,
  \varphi_{r+1}u_j,\dots)=
  \mc G_{\ell}(\dots,\varphi_{r+1}u _i,\dots,\varphi_r u_j,\dots)
\end{equation}
for all $\ell=1,\dots,t$, $1\le i<j\le k$, $u_i,u_j\in U$, and all elements
$v_1,\dots,v_{i-1},
v_{i+1},\dots,v_{j-1},
v_{j+1},\dots,v_k\in V$ that are represented by the points.
Write $v_i:=\varphi_{r+1}u_i$,
$v_j:=\varphi_{r+1}u_j$, and consider the linear map $
\tau:=\varphi_r\varphi_{r+1}^{-1}:
V\to V $. By
\eqref{4},
\begin{equation*}\label{ucd}
  \mc G_{\ell}(\dots,\tau v_i,\dots,
  v_j,\dots)=
  \mc G_{\ell}(\dots,v _i,\dots,\tau v_j,\dots).
\end{equation*}
Therefore, $\tau $ is {$\mc G_{\ell}$-selfadjoint} for each $\ell$.

Let $\lambda_1,\dots,\lambda_s$ be
all the distinct eigenvalues of $\tau$,
and let \[V=V_1\oplus\dots\oplus V_s,\qquad \tau_i:=\tau|V_i
\text{ has the single eigenvalue $\lambda_i$}
\] be the
decomposition of $V$ into the direct
sum of $\tau$-invariant subspaces. By \cite[Lemma 6]{bel-ser_mul},
\[
\mc G_{\ell}=\mc G_{\ell 1}\oplus\dots\oplus \mc G_{\ell s},\qquad
\mc G_{\ell i}:=\mc G_{\ell}|V_i
\]
for each $\ell=1,\dots, t$.
By \cite[Lemma
4(a)]{bel-ser_mul}, there exists $f_i(x)\in\ff[x]$ such
that
$f_i(\tau_i)^{r+1}=\tau_i^{-1}$.
Then
\[
\rho:=f_1(\tau_1)\oplus\dots\oplus
f_s(\tau_s):  V\to V
\]
is $\mc G_{\ell}$-selfadjoint and
$\rho^{r+1}=\tau^{-1}$.

Define the linear bijections
\begin{equation*}\label{6ab}
  \psi_1=\dots=\psi_{r+1}:=
  \rho\varphi_r,
\qquad \psi_{r+2}:=\varphi_{r+2},\dots,
\psi_k:=\varphi_k.
\end{equation*}
Since $\rho$ is $\mc G_{\ell}$-selfadjoint and
\[
 \rho^{r+1}\varphi_r
=\tau^{-1}\varphi_r =(\varphi_r
\varphi_{r+1}^{-1})^{-1} \varphi_r=
\varphi_{r+1},
\]
we have
\begin{align*}
\mc G_{\ell}(\psi_1u_1,\dots, \psi_nu_n)
 &=
\mc G_{\ell}(\rho\varphi_r u_1,\dots, \rho\varphi_r
u_r, \rho\varphi_r u_{r+1},
\varphi_{r+2}
u_{r+2},\dots,\varphi_k u_k)
 \\&=
\mc G_{\ell}(\varphi_r u_1,\dots, \varphi_r u_r,
\rho^{r+1}\varphi_r u_{r+1},
\varphi_{r+2}
u_{r+2},\dots,\varphi_k u_k)
 \\&=
\mc G_{\ell}(\varphi_1u_1,\dots, \varphi_k
u_k)= \mc F_{\ell}(u_1,\dots,u_k).
\end{align*}
The equality
$
\mc G_{\ell}(\psi_{\sigma(1)}u_1,
\dots,\psi_{\sigma(k)}u_k )= \mc F_{\ell}(u_1,\dots,u_k)
$ for an arbitrary $\sigma \in S_k$ is
proved analogously. Therefore, $\psi_1,\dots,\psi_k$ can be used instead of $\varphi_1,\dots,\varphi_k$ and \eqref{bnu} holds.

(b) This statement can be proved as \cite[Theorem 3]{bel-ser_mul}.
\end{proof}

\begin{proof}[Proof of Theorem \ref{ther}]
Let us prove (a); the statement (b) is proved analogously.

Let $k$-linear maps \[\mc F: U\times\dots\times U\to V,\qquad \mc G: U'\times\dots\times U'\to V'\] with $k\ge 2$ be
symmetrically equivalent; that is, \eqref{jnd} holds.
Let  $f_1,\dots,f_t$ be a basis of $V$. Then $f'_1:=\psi f_1$, \dots, $f'_t:=\psi f_t$ is a basis of $V'$. Let \[\mathscr  F:=(\mc F_1,\dots,\mc F_t),\qquad \mathscr G:=(\mc G_1,\dots,\mc G_t)\] be two $t$-tuples of $k$-linear forms  \eqref{gvt2} defined by
\begin{equation}
\label{bgq}
\begin{split}
\mc F(u_1,\dots,u_k)&=
\mc F_1(u_1,\dots,u_k)f_1 +\dots+\mc F_t(u_1,\dots,u_k)f_t
\\
\mc G(u'_1,\dots,u'_k)&=
\mc G_1(u'_1,\dots,u'_k)f'_1 +\dots+\mc G_t(u'_1,\dots,u'_k)f'_t
\end{split}
\end{equation}
for all $u_1,\dots,u_k\in U$ and $u'_1,\dots,u'_k\in U'$.
Substituting \eqref{bgq} in \eqref{jnd}, we obtain \eqref{jndn} for each $\ell=1,\dots,t$. Therefore, $\mathscr F$ and $\mathscr G$ are
symmetrically equivalent.
By Theorem \ref{prop},
they are congruent; that is, \eqref{jndj} holds for some linear bijection $\varphi:U\to U'$ and all $\ell=1,\dots,t$. By \eqref{bgq}, \eqref{jnd8} holds for this $\varphi$ and for $\psi$ from \eqref{jnd}. Hence, $\mc F$ and $\mc G$ are congruent.

In particular, if $\mc F$ and $\mc G$ are both symmetric or both skew-symmetric and they are equivalent, then they are congruent since $\mc F: U\times\dots\times U\to V$ is symmetric if
\[
\forall \sigma \in S_k,\, u_1,\dots,u_k\in U:\ \mc F(u_{\sigma(1)},
\dots,u_{\sigma(k)})= \mc F(u_1,\dots,u_k);
\]
it is skew-symmetric  if
\[
\forall \sigma \in S_k,\, u_1,\dots,u_k\in U:\ \mc F(u_{\sigma(1)},
\dots,u_{\sigma(k)})=\sign(\sigma) \mc F(u_1,\dots,u_k).
\]
For example, if $\mc F$ and $\mc G$ are skew-symmetric and \eqref{jnd7} holds, then
\eqref{jnd} holds too since
\begin{align*}
\mc G(\varphi_{\sigma(1)}u_1,
\dots,\varphi_{\sigma(k)}u_k )
     &=
\sign(\sigma^{-1})\mc
G(\varphi_1
u_{\sigma^{-1}(1)},\dots,
\varphi_k
u_{\sigma^{-1}(k)})
\\
&=
\sign(\sigma^{-1})\psi\mc
F(
u_{\sigma^{-1}(1)},\dots,
u_{\sigma^{-1}(k)})
\\
&=\psi \mc F(u_1,\dots,u_k)
\end{align*}
for each $\sigma \in S_k$ and all $u_1,\dots,u_k\in U$.
Thus, $\mc F$ and $\mc G$ are symmetrically equivalent, and so they are congruent.
\end{proof}

\begin{remark} \label{bvc}
Theorem \ref{ther} in the case of bilinear maps (i.e., for $k=2$) follows from Theorem \ref{t1h}.
Let us prove this fact for the case of an algebraically closed field $\ff$ of characteristic
different from 2.
Let bilinear maps \[\mc F: U\times U\to V,\qquad \mc G: U'\times U'\to V'\] over  $\ff$ be   symmetrically equivalent; that is,
\begin{equation}\label{nnh}
\forall x,y\in U:\ \mc G(\varphi_1x,\varphi_2y) =\mc G(\varphi_2x,\varphi_1y)=\psi
\mc F(x,y)
\end{equation}
for some linear bijections $\varphi_1,\varphi_2:U\to U'$ and $\psi:V\to V'$.

Choose bases $e_1,\dots,e_n$ in $U$ and $f_1,\dots,f_t$ in $V$.
Write
\[
\mc F(e_i,e_j)
=a_{ij}^{(1)}f_1
+\dots+a_{ij}^{(t)}f_t,\qquad
a_{ij}^{(1)},\dots, a_{ij}^{(t)}\in\ff,\] and
define the $n\times n$ matrices \[A_1:=[a_{ij}^{(1)}],\ \dots,\ A_t:=[a_{ij}^{(t)}].\] Then \[
\mc F(x,y)
=([x]_e^TA_1[y]_e)f_1
+\dots+([x]_e^TA_t[y]_e)f_t.
\]
Analogously,
\[
 \mc G(x,y)
=([x]_{e'}^TB_1[y]_{e'})f'_1
+\dots+([x]_{e'}^TB_t[y]_{e'})f'_t
\]
in some bases of $U'$ and $V'$.

Let us prove that the matrix $t$-tuples
 \begin{equation}\label{xxx}
 \mc A:=(A_1,
\dots,A_t),\qquad
\mc B:=(B_1,\dots,B_t)
\end{equation}
are weakly symmetrically equivalent.
Let $\Phi_1$, $\Phi_2$, and $\Psi=[\lambda_{ij}]_{i,j=1}^t$ be the matrices of $\varphi_1$, $\varphi_2$ and $\psi$ in these bases. By \eqref{nnh},
\[
\big([x]_{e}^T\Phi_1^TB_1\Phi_2[y]_{e},
\dots,[x]_{e}^T\Phi_1^TB_t
\Phi_2[y]_{e}\big)^T
=\Psi \big([x]_e^TA_1[y]_e,\dots,
[x]_e^TA_t[y]_e\big)^T.
\]
Hence,
$
[x]_{e}^T\Phi_1^T(B_1,
\dots,B_t)\Phi_2[y]_{e}
=[x]_{e}^T\widetilde{\Psi}[y]_{e}
$
where
\[
\widetilde{\Psi}:=
(\lambda_{11}A_1
+\dots+\lambda_{1t}A_t,\ \dots,\ \lambda_{t1}A_1
+\dots+\lambda_{tt}A_t).
\]
Thus, $\Phi_1^T(B_1,
\dots,B_t)\Phi_2
=\widetilde{\Psi}$.
By \eqref{nnh}, we can take $\varphi_2$ and $\varphi_1$ instead of $\varphi_1$ and $\varphi_2$, and obtain $\Phi_2^T(B_1,
\dots,B_t)\Phi_1
=\widetilde{\Psi}
$. Therefore, the $t$-tuples  \eqref{xxx} are weakly symmetrically equivalent. By Corollary \ref{t1n1}(a), they are weakly congruent; that is, we can take $\Phi_1=\Phi_2$. Then $\varphi_1=\varphi_2$, and so $\mc F$ and $\mc G$ are congruent.
\end{remark}

\section*{Acknowledgements}
V. Futorny was supported by the CNPq (304467/2017-0) and the FAPESP (2018/23690-6).  V.V.~Sergeichuk was
supported by FAPESP (2018/24089-4). The work was started when V.V.~Sergeichuk visited the Ben-Gurion University of the Negev.