\documentclass[10pt]{article}

\usepackage{fullpage}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{titlesec}
\usepackage[section]{placeins}
\usepackage{xcolor}
\usepackage{breakcites}
\usepackage{lineno}
\usepackage{hyphenat}





\PassOptionsToPackage{hyphens}{url}
\usepackage[colorlinks = true,
            linkcolor = blue,
            urlcolor  = blue,
            citecolor = blue,
            anchorcolor = blue]{hyperref}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@combinedblfloats{\box\@outputbox}{\unvbox\@outputbox}{}{%
  \errmessage{\noexpand\@combinedblfloats could not be patched}%
}%
\makeatother


\usepackage{natbib}




\renewenvironment{abstract}
  {{\bfseries\noindent{\abstractname}\par\nobreak}\footnotesize}
  {\bigskip}

\titlespacing{\section}{0pt}{*3}{*1}
\titlespacing{\subsection}{0pt}{*2}{*0.5}
\titlespacing{\subsubsection}{0pt}{*1.5}{0pt}


\usepackage{authblk}


\usepackage{graphicx}
\usepackage[space]{grffile}
\usepackage{latexsym}
\usepackage{textcomp}
\usepackage{longtable}
\usepackage{tabulary}
\usepackage{booktabs,array,multirow}
\usepackage{amsfonts,amsmath,amssymb}
\providecommand\citet{\cite}
\providecommand\citep{\cite}
\providecommand\citealt{\cite}
% You can conditionalize code for latexml or normal latex using this.
\newif\iflatexml\latexmlfalse
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}%

\AtBeginDocument{\DeclareGraphicsExtensions{.pdf,.PDF,.eps,.EPS,.png,.PNG,.tif,.TIF,.jpg,.JPG,.jpeg,.JPEG}}

\usepackage[utf8]{inputenc}
\usepackage[english]{babel}



\usepackage{float}








\begin{document}

\title{Multi-attribute Recognition,the key to Universal Neural Network}



\author[1,1,1,1]{Jinxin Wei }%
\affil[1]{Vocational School at Juancheng}%


\vspace{-1em}



  
  \date{May 22, 2024}


\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup





\selectlanguage{english}
\begin{abstract}
To achieve the recognition of multi-attribute of object, I redesign the
mnist dataset, change the color, size, location of the number.
Meanwhile, I change the label accordingly. The deep neural network I use
is the most common convolution neural network. Through test, we can
conclude that we can use one neural network to recognize multi-attribute
so long as the attribute difference of objects can be represented by
functions. The Concrete network (generation network) can generate the
output which the input rarely contained from the attributes the network
learned. Its generalization ability is good because the network is a
continuous function. Through one more test, we can conclude that one
neural network can do image recognition, speech recognition, nature
language processing and other things so long as the output node and the
input node and more parameters add into the network. The network is
universal so long as the network can process different inputs. By proof,
fully connected network can do what convolution neural network and
recurrent neural network do, so fully connected network is the universal
network. The phenomenon of synesthesia is the result of multi-input and
multi-output. Connection in mind can realize through the universal
network and sending the output into input. Connection in mind is the key
of creativity, synesthesia is the assistant.\\%
\end{abstract}%



\sloppy


Multi-attribute Recognition,the Key to Universal Neural Network

Jinxin Wei\textsuperscript{1}, Qunying Ren\textsuperscript{2}

\textsuperscript{1}Vocational School of Juancheng, Juancheng 274600
China

\textsuperscript{2} Bureau of Emergency Management of Juancheng County,
Juancheng 274600 China

Abstract: To achieve the recognition of multi-attribute of object, I
redesign the mnist dataset, change the color, size, location of the
number. Meanwhile, I change the label accordingly. The deep neural
network I use is the most common convolution neural network. Through
test, we can conclude that we can use one neural network to recognize
multi-attribute so long as the attribute difference of objects can be
represented by functions. The Concrete network(generation network) can
generate the output which the input rarely contained from the attributes
the network learned. Its generalization ability is good because the
network is a continuous function. Through one more test, We can conclude
that one neural network can do image recognition, speech recognition,
nature language processing and other things so long as the output node
and the input node and more parameters add into the network. The network
is universal so long as the network can process different inputs. By
proof, fully connected network can do what convolution neural network
and recurrent neural network do, so fully connected network is the
universal network.The phenomenon of synesthesia is the result of
multi-input and multi-output. Connection in mind can realize through the
universal network and sending the output into input. Connection in mind
is the key of creativity, synesthesia is the assistant.

\textbf{keywords:} Computer vision, multi-attribute, deep neural
network, multi-dimension, data processing, universal neural network,
parallel processing, speech recognition, nature language processing,
synesthesia, connection in mind

Redesign of Mnist

There are many multi-label learning examples which contain many labels
and networks. I design a single label and a single network to solve the
multi-attribute problem.

Because we don't have the dataset fit for my task, so I redesign the
mnist dataset. Because the visual attributes of object recognized by
mankind are color, size, location, shape, texture, quantity, pattern, so
we choose the color, size, location, and shape attributes as example.
Because the mnist dataset already has the shape attribute, so we only
need to add color, size, location. First, we change the color. Because
the color represented by computer is mixed by red, green and blue, so we
change the number's color to red, green and blue. We assign the gray's
pixel data to red channel, green channel, blue channel separately, the
other two channels are zero. The background is all 255. Secondly, we
change the size. Shrinking the image to size 1818, then put the pixel to
the white background of size 2828. When we put the pixel to up part of
the background, we change the location. Next we change the label. We use
the label form similar to the label form used in classification. Class
0-9 is one hot encoding. For example, 0100000000 is 1. Because there are
3 colors, so the red color is 100, green is 010,blue is001. The index of
color label is 10-12. Because there are two sizes which are big and
small, so the code is 01, 10 and the index is 13-14. Because there are
two locations which are up and middle, so the code is 10, 01 and the
index is 15-16.So far, we finish the dataset's processing work. The
order of label is number, color, size, location. For example,
01000000001000101 represents big middle red 1. Why we use one hot
encoding? Because each class has one output, we can generate the
multi-output by regression, and the output is from 0 to 1 which is
similar to data normalization.

Test Design

Now we design the network. The experiment is done by tensorflow
framework. The regression network have 3 convolution layers and 2 fully
connected layers, no maxpooling and padding, activation function is
leaky relu{[}2{]}. Because they will cause generation loss. The
generation network is the inverse function {[}4{]}of regression network.
You can read my another paper named `A Functionally Separate
Autoencoder', which describes the detail of generation from label to
concrete information. When training the regression network, loss
function is mean squared error, optimizer is adam{[}3{]}, metrics is
accuracy{[}3{]}. I take np.argmax(){[}1{]} of prediction{[}:,0:10{]},
{[}:,10:13{]}, {[}:,13:15{]}, {[}:,15:17{]} separately, and the real
label is processed the same way. The regression value become index type
through this, and the accuracy can be calculated by comparing the data.
When training the generation network, loss function is mean squared
error, optimizer is adam, metrics are mean absolute error and cosine
similarity, input is multi-attribute label, output is image. So, let's
see the result which is shown in Fig. 1.1 and Fig. 1.2.\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image3/image3}

\end{center}
\end{figure}

\textbf{Fig.1.1.} Regression Effect on Test Data (image is input, label
is regression result)

From Fig. 1.1 and Fig. 1.2, we can see that the labels of the regression
are all right, the generation is ok although it is a little blurry.
Through test, we can conclude that we can use one neural network to
recognize multi-attribute so long as the attributes can be represented
by functions.

Generation Test

Now let's modify the label to some degree, then see the generation.
First, I change the color to {[}0.5,0.5,0{]}, {[}0.5,0,0.5{]},
{[}0,0.5,0.5{]}, {[}0.3,0.3,0.3{]}, {[}0.5,0.2,0.3{]},
{[}0.2,0.3,0.5{]}, {[}0.3,0.5,0.2{]}.The result is shown in Fig. 2.
Second, I change the size to{[}0.5,0.5{]}, {[}0.3,0.7{]}, the result is
shown in Fig. 3.. Last, I change the location to{[}0,1.05{]},
{[}1.05,0{]}, {[}0.5,0.5{]}, {[}0.55,0.45{]}, the result is shown in
Fig. 4. Why the sum is equal to1? Because the label is one hot encoding
and the attribute is exclusive, we can't make one thing big and small
simultaneously. The connection can't make the output to 1
simultaneously.\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image4/image4}

\end{center}
\end{figure}

\textbf{Fig. 1.2.} Generation Effect on Test Data (image is generation
result, label is input)\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image5/image5}

\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image6/image6}

\end{center}
\end{figure}

\textbf{Fig. 2.} Effect of Color Change\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image7/image7}

\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image8/image8}

\end{center}
\end{figure}

\textbf{Fig. 3.} Effect of Size Change\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image9/image9}

\end{center}
\end{figure}\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image10/image10}

\end{center}
\end{figure}

\textbf{Fig. 4.} Effect of Location Change

From the pictures we can see that we can generalize the rare situation
through the attribute we learned. Although we just use three-primary
colors, but we can generate other colors. We can generate the medium
state of big and small, up and middle. Its generalization ability is
good because the network is a continuous function.

Multi-input and Multi-output Test

Inspired by multi-attribute and computer input/output principle and the
difference between speech recognition and image recognition can be
represented by function, I design a network to process speech
recognition and image recognition simultaneously. It is shown in Fig. 5.
The multi-attribute network is one input, several outputs, but this
network is several inputs and several outputs. The dataset is mnist and
some downloaded speech data. The amount of speech data is small because
I can't find larger dataset. The two task are all classification task, I
change them to regression. I concatenate the mnist and the speech data
as the input, the labels of the two datasets are also concatenated. For
simple, I choose the fully connected network which has 5 layers for my
task. The first four layers have 60 neuron units each, the last layer
has 20 because there are twenty classes(mnist:10 classes, speech
dataset:10 classes). The label is one hot encoding. When training it,
loss function is mean squared error, optimizer is adam, metrics is
accuracy(calculate the two type tasks separately). Because the shape of
mnist image is 2828 and the shape of audio is 2011, and there are 20477
audio samples which split into train data and test data by the ratio of
0.7. So the shape of train data is (14333,1004) and the shape of test
data is (6144,1004). The shape of train label is (14333,20) and the
shape of test label is (6144,20). Through test, the accuracy of image
regression on test dataset is 86.5\% and the accuracy of speech
regression on test dataset is 79.8\%. The accuracy will be higher when
the dataset is larger. Because the samples of mnist are larger than the
audio data, so we can input images only and make the audio input to -1.
We can add one output which indicates no input of audio when it is 1 and
there is input of audio when it is 0. By adding these changes, the
accuracy of image regression is also 86.6\%. So the universal network
can also process single input. It is important to note that the accuracy
of image and audio on test data is 10\% less than the accuracy of image
and audio on test data separately. Through test, we can conclude that
one network can do two(I don't test more than two) tasks simultaneously,
the parameters are shared by the two tasks, so it is parallel
processing. I guess it can do more than two tasks simultaneously, so it
is universal neural network. When it does several tasks simultaneously,
the understanding ability increases. Because we can make decision base
on multi-dimension information, so it is more intelligent.\selectlanguage{english}
\begin{figure}[H]
\begin{center}
\includegraphics[width=0.70\columnwidth]{figures/image13/image13}

\end{center}
\end{figure}

\textbf{Fig. 5.} The universal network

Thinking

I guess that the phenomenon of synesthesia is the result of multi-input
and multi-output, because I don't have other sensory data. Because the
parameters of network shared by the multi-input and multi-output, so one
input may affect other output when the two outputs are the attributes of
some similar object, such as fire and sun which have red color and hot
attributes. For example, When we see red(vision input), we may feel
warm(warm sensation output), however When we see blue, we may feel cool.
Because we can also use the fully connected network to process sequence
data (The last paragraph is the proof)and nature language processing is
also represented by functions, so nature language processing can use the
same network as image recognition and speech recognition so long as the
output node and the input node and more parameters add into the network.
The network is universal so long as the network can process the
different inputs. We can first send image or speech to the network and
the output is language or other information, then send the language or
information to the network's input, process it or predict it. I guess
that connection in mind can realize through the universal network and
sending the output into input. For example, it's cloudy now. This
information is sent to the network's input, the predict output is there
will be a rain. This output is sent to network's input, the predict
output is that I need an umbrella. Because the information about it's
cloudy and there will be a rain is represented by image or audio or
language, so only universal network can do it. The most likelyhood event
can be seen as the effect of the cause. It's causal reasoning.
Connection in mind is the key of creativity, synesthesia is the
assistant.

The Proof

The fully connected network can be expressed as that.

{[}1{]} (1)

(2)

(3)

has relations with because of . Meanwhile have relations with because of
. So we don't need recurrent neural network. Because fully connected
network also can do what convolution neural network do, so fully
connected network is the universal network.

Conclusions

1.The abstract network(prediction network) achieves the intended
functionality of multi-attribute recognition through multi-dimension
regression. The Concrete network can generate the output which the input
rarely contained from the attributes the network learned. Its
generalization ability is good because the network is a continuous
function.

2.We can use one neural network to do image recognition, speech
recognition, nature language processing and other things simultaneously
so long as the output node and the input node and more parameters add
into the network. The network is universal so long as it can process
different inputs. I guess that the phenomenon of synesthesia is the
result of multi-input and multi-output. I guess that connection in mind
can realize through the universal network and sending the output into
input.

References

\begin{enumerate}
\tightlist
\item
  Ian Goodfellow, Yoshua Bengio, Aaron Courville, Deep Learning, MIT
  Press, (2016)
\item
  Andrew L. Maas, Awni Y. Hannum and Andrew Y. Ng, Rectified
  Nonlinearities Improve Neural Network Acoustic Models, ICML, (2013)
\item
  Tensorflow Tutorials and Apis, https://tensorflow.google.cn/learn last
  accessed 2020/3/20
\item
  Jin-xin Wei, Qun-ying Ren, A Functionally Separate Autoencoder,
  unpublished
\end{enumerate}

\selectlanguage{english}
\FloatBarrier
\end{document}

