extfieldsofstudy:
Computer Science
Psychology

text:
A Deep Neural Framework for Contextual Affect Detection

A short and simple text carrying no emotion can represent some strong emotions when reading along with its context, i.e., the same sentence can express extreme anger as well as happiness depending on its context. In this paper, we propose a Contextual Affect Detection (CAD) framework which learns the inter-dependence of words in a sentence, and at the same time the inter-dependence of sentences in a dialogue. Our proposed CAD framework is based on a Gated Recurrent Unit (GRU), which is further assisted by contextual word embeddings and other diverse hand-crafted feature sets. Evaluation and analysis suggest that our model outperforms the state-of-the-art methods by 5.49% and 9.14% on Friends and EmotionPush dataset, respectively.

Introduction
It becomes quite natural for us to gauge the emotion of a person if they explicitly mention that they are angry, sad or excited or even if they use the corresponding emojis at the end of the sentence, but what if there happens a drift in emotion while having a series of conversation between two people? And what if they stop using emotional emojis after a certain point of time even though they continue to be in the same state of emotion. Even human annotators may be confused if they do not consider context. Given that, even face-to-face conversation is confusing, sometimes, it should not be a matter of surprise if there could be a misinterpretation in textual conversations. The situation can get worse if there is a multi-party 1 conversation. In this scenario, emotion of one speaker can change due to the utterance of the second speaker, and can again be switched due to the intervening of the third speaker. We have to be attentive to every speaker in the conversation or else our context would be lost.
Although a significant amount of research has been carried out for emotion analysis, only in the recent time there is a trend for performing emotion analysis Oh no-no-no, give me some specifics. Non-Neutral Chandler I love the specifics, the specifics were the best part! Non-Neutral Joey Hey, what about the scene with the kangaroo? Did-did you like that part? Neutral Chandler I was surprised to see a kangaroo in a World War I epic.
Non-Neutral Joey You fell asleep!! Anger Joey There was no kangaroo! Anger of the dialogues in order to build an effective and human-like conversational agent.
Our current work focuses on detecting emotions in a textual dialogue system. We aim at labeling each utterance of a dialogue with one of the eight emotions, which comprises of Ekman's [4] six basic emotion tags, i.e., anger, fear, sadness, happiness, disgust and surprise plus neutral and non-Neutral 2 emotion. An example instance is depicted in Table 1. If we look at the last utterance in the table i.e., There was no kangaroo!, it can be considered as neutral but while we consider its previous context, it should be assigned with the anger class.
Our deep neural network framework follows a stacking structure which utilizes bidirectional gated recurrent unit (Bi-GRU)arranged in an hierarchical form. The lower Bi-GRU produces utterance level embeddings, and the upperlevel Bi-GRU makes use of these embeddings to capture the contextual information in the dialogue. Some handcrafted features are incorporated at the different levels of the model to capture more linguistic evidences, which eventually found to be effective compared to the other models. We evaluate our proposed system on the benchmark dataset of EmotionLines 2018 [1]. We observe that our proposed framework attains better performance compared to the state-of-art model.

Related Work
Emotion detection and Sentiment classification have always been a hot research topic in the area of Natural Language Processing (NLP). Existing research on emotion detection have mostly focused on textual contents. In recent times, deep neural nets are being used very extensively to perform emotion analysis in a variety of domains, mediums and languages. Some of the most widely used models for capturing emotions include Convolutional Neural Network (CNN) [11] and Recurrent Neural Networks (RNN) [14] like Long-Short Term Memory (LSTM) [12] and Gated Recurrent Unit (GRU) [2]. All these works focus on to classifying emotions at the sentence level or utterance level, and thus cannot capture the context and inter-dependence among the utterances in dialogue. [17] proposed a network which made use of bidirectional long contextual short-term memory to detect the emotion of an utterance in dialogue and named it as bcLSTM. Later on, [6] improved bcLSTM by introducing a memory network which makes use of speaker information as well for context modeling. The authors in [13] used Bi-LSTM to capture word dependencies and to extract relevant features for detecting various emotions. On top of that, they applied selfattention [21] to capture the inter-dependencies between the utterances of a dialogue. The work reported in [18] uses hierarchical attention network model [22] to embed contextual information among the utterances in a dialogue. [8] used a bidirectional gated recurrent unit (Bi-GRU) [3] fused with self-attention [21] and its word embeddings to efficiently utilize word-level as well as utterance-level information.
Our proposed model differs from the existing models in the sense that we derive deep contextualized representation of each word in an utterance, and then incorporate it into the model as a feature along with the pre-trained Glove word embedding [15]. We acquire these word embedding from the pre-trained ELMo [16] model. These representations take the entire context into account. Being character based, they allow the network to use morphological cues to form robust representations for out-of-vocabulary words unseen in training. We use hierarchical Bi-GRU to learn the context in a dialogue fused with various handcrafted features obtained through transfer learning over similar tasks.

Proposed Methodology
In this section, we describe our proposed framework in details. Unlike the previous models, which performed exceptionally well in predicting some emotions follows complex architecture.. Evaluation shows that a model which performs very well for a specific emotion class compensates with the lower performance in other emotion classes (i.e. performs at the cost of other classes). In contrast, our model is straightforward and efficient, and at the same time outperforms every different models with significant margins. It consists of two layers of hierarchythe lower layer is for encoding the utterances (named as utterance-encoder ), and the upper layer is for encoding the dialogues (named as dialogue-encoder ).
Given a batch/dialogue 3 , firstly the individual utterances are passed through utterance-encoder which comprises of a recurrent layer (biGRU) followed by a max-pooling layer. GRU learns the contextual representation of each word in an utterance, i.e., the representation of each word is learned based on the sequence of words in the utterance. Subsequently, we apply max-pooling over the hidden representation of each utterance to capture the most important features over time. The obtained utterance representations form the input to the dialogueencoder, which again comprises of biGRU to capture the contextual information of each utterance in a dialogue. Since the task is to classify each utterance of a dialogue, the hidden representations of biGRU over the time are passed through fully connected layer followed by Softmax to obtain the corresponding emotion label. Further, the inputs to utterance encoder and dialogue encoder are assisted by a diverse set of hand-crafted features (c.f. Section 3.1) for the final prediction. Figure 1 depicts our proposed architecture.

Hand-crafted Features
We make use of transfer learning to capture important evidences obtained from the various state-of-the-art pre-trained deep learning models. Following subsections explain these models in details: -DeepMoji [5]: DeepMoji performs distant supervision on a very large dataset [20] (1.2 billion tweets) comprising of noisy labels (emojis). By incorporating transfer learning on various downstream tasks, they were able to outperform the state-of-the-art results on 8 benchmark datasets on 3 NLP tasks across the five domains. DeepMoji can give an excellent representation of text which can be incorporated in any sentiment or emotion detection model to improve the performance. Since our target task is closely related to this, we adopt this for our domain and extract the embeddings of 2304 dimension from the attention layer, which acts as the utterance embedding feature for upper-level (dialogue-encoder) of the model. -ELMo [16]: Unlike traditional word embedding techniques, ELMo makes use of bidirectional LSTM network to create word representations. This biLSTM is trained with a coupled language model objective on a large text corpus. Thus we can say, each word representation is a function of the entire sentence. It analyses the words within the context that they are used, thus capturing the syntactic as well as semantic characteristics of the words and also take care of variance across the linguistic contexts. Also, being character based, we can have representations of out-of-vocabulary words as well. Since it is proven that the addition of ELMo representations can improve the performance of any NLP model, we incorporate it into our model along with the pre-trained Glove word embedding. To reduce the processing time, we extracted the 1024 dimensional ELMo word embeddings beforehand instead of creating it during the process.

Word Embedding
Embedding matrix is generated from the pre-processed text using a combination of pre-trained and deep contextualized word embedding: 1. Pre-trained GloVe embeddings for tweets [15]: We use 300-dimensional pre-trained GloVe word embeddings, trained on the Twitter corpus, for the experiments. The glove is a count-based model that captures the count of the word, i.e., how frequently it appears in a context. 2. Deep contextualized ELMo embeddings [16]: We extract 2304 dimensional word vectors from ELMo embedding model, which learns the embedding from an internal state of biLSTM and represents word-level contextual features of the input text.
We finally concatenate the word representation of both the embeddings, which act as input to the utterance-encoder (lower level).

Dataset Description
For experiments, we use the benchmark dataset of EmotionLines 2018 [1], which is an emotion annotated corpus of multi-party conversation. The dataset comprises of two individual corpus of dialogue set extracted from two different sources, one from the famous TV show scripts named Friends, and the other from human to human chat logs on Facebook messenger through an application called EmotionPush.
1. Friends TV series data : The Friends script was crawled, and each scene of an episode was treated as a dialogue. Thus each dialogue consists of multiple speakers. [1] separated the dialogues based on its window size 4 of [5,9], [10,14], [15,19], and [20,24]. Finally, they randomly collected 250 dialogues from each-thus creating a corpus of 1000 dialogues, which are further splitted up into 720, 80, and 200 dialogues for training, validation and testing, respectively. 2. EmotionPush Chat log data: This data was collected by crawling the private conversation among the friends on facebook messenger with the help of EmotionPush app. To protect the private information of the users like names, organizations, locations, email address, and phone numbers, they used a two-step masking procedure. They treated the conversations lasting not more than 30 minutes as a dialogue. Finally, they make use of the same procedure for sampling and categorizing as they used for Friends TV script and collected 1000 dialogues which were again divided in the same ratio for training, validation, and testing. Table 2 shows the distribution of both Friends and EmotionPush datasets in terms of the number of dialogues, the number of utterances, and the number of emotion labels. To compare our model we follow the setup of [7] and evaluate its performance only on four emotions, i.e., anger, joy, sadness and neutral on both Friends and EmotoinPush datasets, and excluding all the other emotion classes during training of our model. We ignore other emotion classes by setting their corresponding loss weights to zero. Fig 2 depicts the distribution of emotion classes into train, validation, and test set for both Friends and EmotionPush datasets.

Pre-processing
Friends data consists of scene snippets containing multi-speaker conversation, while EmotionPush data includes Facebook messenger chats between two individuals. Both datasets contain some incomplete sentences and excessive use of punctuations. In addition to it, EmotionPush data also contains emoticons which are absent in the Friends data. We believe that the reason behind it is that Friends data is the script which is collected by converting audio to text. We perform the following pre-processing steps:  remove extra space, emoticons and the newline character. Finally, we perform word tokenization to construct the vocabulary of words and symbols. The tokens, thus, collected are mapped to their corresponding 300-dimensional Glove vectors.

Experiments
We pad each utterance to a maximum length of 50 words. The GRU dimension is set to 300 for both lower and upper level. We employ 300 plus 1024 dimensional word embeddings and 300 plus 2304 dimensional sentence embeddings for the experiments. We use Tanh activation and set the Dropout [19] as 0.5 in order to prevent the model from overfitting. We optimize our model using Adam optimizer along with weighted categorical cross-entropy loss functions for emotion classification. From Table 2, it is clear that EmotionLines data suffers from class imbalance issue. We follow [9] to prevent our model from getting biased towards more frequently occurring emotion classes-thereby providing larger weights to the losses corresponding to less frequently occurring classes and vice-versa.
We conduct our experiments on the Pytorch framework 5 . We adopt the official evaluation metric of EmotionX 2018 [7] shared task, i.e. weighted accuracy (WA) (eq.1) and un-weighted accuracy (UWA) (eq.2), for measuring the performance of our model. We train our model for the maximum 50 epochs with early stopping criteria on validation accuracy, having the patience of 10. We initialize the learning rate by 0.00025 with the decaying factor of 0.5 on every 15 epochs.
where a c refers to the accuracy of emotion class c and p c refers to the percentage of emotion class c in the test set.  Table 3 shows the evaluation results of the top-performing existing models so far compared with that of our proposed framework. In the table, HiGRU and HiGRU-sf are proposed by [8]. Results show that our model outperforms all the other models with a significant margin. Further, we observe the improvement to be statistically significant with 95% and 99% confidence on Friends and Emo-tionPush dataset, i.e., the p-value is less than 0.05 for paired T-test [10] of both the datasets. On Friends dataset, our model reports un-weighted and weighted accuracy of 74.39% and 75.94% as compared to that of 68.9% and 74.4% of the state-of-art models, thus improving them by 5.49% and 1.54%. On the other hand, our CAD framework performs better on EmotionPush dataset as well, reporting the unweighted and weighted accuracies of 80.18% and 86.24%, respectively, as compared to that of 70.2% and 77.1% in the state-of-art model, thus giving an increment of 9.14% and 9.98%. It is worth noticing that the accuracy of anger in EmotionPush dataset increases by 17.38 points without compensating with the other classes. This implies that for all the emotion classes our framework performs reasonably competent with the accuracies being balanced and not biased to any specific class.
To test the correctness of our prediction, we adopt some examples where the emotion drift occurs over an extended context. It can be seen from the Table  4 that rare emotions are predicted correctly. Thus we can say that our model captures the contextual information in the dialogue pretty well.

Error Analysis
In Figure 3, we show the confusion matrices for both the datasets (i.e., Friends and EmotionPush) for quantitative analysis. We find that joy and sad emotions are mostly confused with neutral, possibly due to the absence of affective words and large number of neutral class. Most of the neutral emotions get confused with joy due to the presence of some positive sentiment words. Majority of anger emotion in EmotionPush dataset are missclassified as neutral (mostly due to absence of any sentiment bearing words) while that of Friends dataset are misclassified as joy due to presence of exclaimation mark which shows strong emotion such as joy or anger. The presence of positive sentiment enforce it to predict joy.  We also perform a qualitative analysis to get better insights about the strength and weakness of the system. We found that, apart from dominating the effect of higher distribution class, few other error cases are present such as: -Loss of emotion drift: When a strong emotion such as anger is encountered, it continues to be predicted. The reason behind it might be because we did not consider the speaker information while extracting contextual information from the utterances. An example is shown in the first part of Table  5. -Usage of expression like lol, haha, etc.: Conversations involving such expressions have led to misclassifications of prediction by the model for some of the instances. An example is given in the second part of Table 5. The sentences are originally labeled Sad. However, due to the presence of a smiling expression-related term (haha and lol ), the model has predicted it as Joy.

Conclusion
In this paper, we have presented a hybrid deep neural network framework (CAD) for detecting emotions in a dialogue. We propose a hierarchical BiGRU network which takes the assistance of various hand-crafted feature set on different levels of architecture to learn the contextual information of dialogue. The learned representation is fed to a fully connected layer over the time steps followed by softmax layer for the predictions. We have evaluated our model on the benchmark datasets of EmotionLines-2018, which consists of two corpora i.e., Friends and EmotionPush data. The evaluation suggests that our CAD framework obtains improved results against the state-of-art model so far. This model can be applied to various other similar datasets as well to improve their results.

Acknowledgement
Asif Ekbal acknowledges the Young Faculty Research Fellowship (YFRF), supported by Visvesvaraya Ph.D. scheme for Electronics and IT, Ministry of Electronics and Information Technology (MeitY), Government of India, being implemented by Digital India Corporation (formerly Media Lab Asia).


Machine Learning Methods for Industrial Protocol Security Analysis: Issues, Taxonomy, and Directions

Machine learning has been widely studied in the security analysis of Industrial Control Systems (ICSs). However, in industrial scenarios, the amount of data as well as the speed of data generation are very different from standard machine learning data sets. Using these heterogeneous data and finding meaningful insights for practical security applications in ICSs is a big challenge. In addition, ICSs have been built for quite a long time. Security has not been seriously taken into account when ICSs were built. Security assessment or attack prevention cannot always be done in real time, as an ICS requires to be online all the time, especially when it comes to systems that affect critical infrastructure. In this work, we are motivated to a provide a clear and comprehensive survey of the state-of-the-art work that employs machine learning in security applications in ICSs, including vulnerability analysis, vulnerability detection and exploitation, anomaly detection and security assessment. Based on our in-depth survey, we highlight the issues of industrial protocol analysis with machine learning methods, provide the security applications with machine learning in ICSs and indicate the future directions.

I. INTRODUCTION
Industrial control systems have been widely used in various control domains, such as energy, municipal, water conservancy, railway, petroleum and petrochemical, etc., which are indispensable for the stable operation of the current industry. ICS protocols are the channels for the control system to transmit information, whose security are closely related to the safe and stable operation of the entire system. Therefore, this paper analyzes the security vulnerabilities of the ICS protocol and gives examples of exploits, aiming to attract the attention of industrial security researchers and take appropriate security measures in a timely manner before it is too late.
There are currently various ICS protocols in industrial control systems, while specific industries typically The associate editor coordinating the review of this manuscript and approving it for publication was Min Xia . use only one or several specific protocols. Of course, for industries with complex processes, such as manufacturing, multiple protocols may be used, which makes the matter complicated. SCADA protocols include a series of fieldbus protocols that use serial link communication and several Ethernet protocols based Ethernet communication, including some application layer protocols over the TCP/IP protocol.
At the beginning of the development of industrial control systems, the protocols used were basically fieldbus protocols based on serial links, which mainly solved the digital communication between field devices such as intelligent instrumentation, controllers and actuators in industrial fields and information transmission issues between these field control devices and advanced control systems. Due to the outstanding advantages of fieldbus, such as easy-to-use, reliable, and economical, it has been highly valued by many standards bodies and computer manufacturers, which lead to a prosperous development era.
Due to the wide variety of fieldbus and different standards, many people hope that Ethernet technology can intervene in the lower layers of the device and widely replace the existing fieldbus technology. Schneider is an active advocate and practitioner of this idea. A number of industrial products and practical applications have been available. With the advent and development of Ethernet technology and the advancement of Internet technology, early serial link-based fieldbus protocols gradually evolved to Ethernetbased. For example, Modbus protocol cluster has serial link based MODBUS RTU, MODBUS ASCII, MODBUS PLUS and Ethernet based MODBUS TCP; Profibus protocol cluster has serial link based PROFIBUS FMS, PROFIBUS DP, PROFIBUS PA and Ethernet based PROFINET CBA, PROFINET IO; IEC60870 protocol cluster has serial link based DNP3 and Ethernet based DNP3/UDP, DNP/TCP; IEC 60870-5-101 based on serial link and IEC60870-5-104 based on Ethernet. In addition to the above-mentioned several traditional general protocols, protocols widely used by ICS in the power industry include protocols such as ICCP (IEC 60870-6, TASE.2) and IEC 61850.
Due to the limitations of technology and the interests of various manufacturers, such a variety of industrial bus technologies coexist. The status of Ethernet technology will continue to penetrate for a while, but in any case, the Ethernetbased ICS protocol is still the trend of future development.
Enhancing the security of the ICS protocols is one of the important ways to enhance the overall security of the industrial control system. A basic analysis of the protocol will help expose the security issues that exist in the protocol, which in turn will guide the development of the security mechanism and eventually be incorporated into the protocol description. Due to the diversity of industrial control protocols and the existence of a large number of proprietary protocols, the security analysis of industrial protocols is relatively difficult task. Therefore, the traditional methods cannot be adopted directly. Fortunately, there is a large amount of research work using machine learning algorithms for security analysis, exploitation detection and security assessment of industrial protocols.
We make the following contributions: • We demonstrate the reasons for the formation of vulnerabilities and combines experiments to achieve exploits for a number of protocols. It aims to provide a guide to the security enhancement of existing protocols or the design of new high security protocols by analyzing the security of the protocol and fully exposing the existing security risks.
• We provide the applications of machine learning algorithms on industrial protocols for security analysis, vulnerability exploitation detection, and security assessment. We also provide four methods to perform the assessment of the ICS protocols and make a comparative analysis of these methods.
• Based on our in-depth analysis of machine learning methods for industrial protocol security analysis, we summarize their issues and taxonomy, and provide a comprehensive perspective for future research work.
The structure of this paper is as follows. Section II sorts and categorizes relevant research work, Section III analyzes the causes of two types of vulnerabilities in ICS protocols and machine learning algorithms respectively, and Section IV analyzes possible attacks of ICS protocols, giving the attack implementation examples, and classifies the exploitation detection algorithms. Section V introduces some methods on how to make risk assessment on ICS protocols and gives a comparative analysis of different machine learning algorithms. Section VI concludes this paper.

II. RELATED WORK
Many researchers have conducted research on the security of ICS protocols, mainly focused on the following aspects: ICS protocols security analysis, ICS protocols vulnerability mining and protocols security hardening.

A. ICS PROTCOLS SECURITY ANALYSIS
Luswata et al. [1] conducted a penetration test on Modbus TCP and tested existing security countermeasures unique to ICS systems, giving some recommendations for improving ICS security. Grandgenett et al. [2] conducted exploit experiments on the CIP protocol, including exploits for authentication and privileged I/O in a CIP implementation, where CIP is an application-level protocol used by ICS components for communicating with each other. ANSI C12.22 specifies the communication interfaces for data communication networks in smart grids. Rrushi et al. [3] have identified several design vulnerabilities in the ANSI C12.22 protocol specification that can be exploited to cause denial of service attacks and service interruptions. They presented some revisions to the ANSI C12.22 protocol specification to mitigate the effects of these vulnerabilities. Yoo and Shon [4] developed a grammar-based fuzzing tool for extracting dynamic information from target program execution and experimenting it with two applications using the Modbus protocol, which is widely used in ICS systems. Samtani et al. [5] applied Shodan to search for ICS devices and evaluated their vulnerability by using Nessus tools against the National Vulnerability Database(NVD). Singh et al. [6] believed that DNP3 has exhaustive specification and is complex to implement, so they have specifically studied the attack on function code to help detect the security of protocol implementation.
Kim [7] discussed various forms of threats and vulnerabilities faced by IP-based wireless sensor networks and proposed a proper security management approach. Pidikiti et al. [8] analyzed the vulnerabilities of the IEC60870-5-101 & 104 communication protocols, which are widely used in power utilities sector, and conducted experiments on the vulnerability exploitation. They proposed an experimental model by using standard IEC62351 to mitigate attacks. By analyzing the Modbus packets, Carcano et al. [9] inferred the correct behaviors of the ICS and discovered the critical state of the ICS, thus designing a state-based network intrusion detection system (NIDS). Liu et al. [10] pointed out that there are a large number of IP-based communication networks in substations, which are geographically dispersed, resulting in large attack surface for substations. They evaluated the threats facing ICS and gave some mitigation measures. Formby et al. [11] analyzed the security of TCP protocol, which used by many devices in the power grid as the transport layer of its application, and conducted experiments of TCP sequence number prediction attacks in the power grid. Cardenas et al. [12] conducted an attack on the process control system and discussed the risk assessment, detection and response of the industrial control system. Kalluri et al. [13] explained the possible vulnerabilities in the power grid, implemented a denial-of-service attack against the power grid, and gave an analysis of the impact of this attack. Bellettini and Rrushi [14] represented memory access taintedness as a decision tree to perform vulnerability analysis of ICS protocol binaries, aiming to mining memory corruption vulnerabilities in implementations. Cagalaban and Kim [15] employed the attack tree to model ICS and performed vulnerability analysis, and proposed a security framework to improve the security of ICS.

B. ICS PROTOCOLS VULNERABILITY MINING
Bratus et al. [16] designed an inline fuzzing test tool named LZFuzz, through the man-in-the-middle attack method, the two-way fuzzing test of ICS protocols was performed and achieved good results on ICS protocols that are proprietary or poorly documented. In our previous work [17], we designed a fuzzing tool called EUFuzz, aiming to solve the dilemma of poorly documented private protocols and low efficiency of fuzzing. EUFuzz can quickly identify the packet structure and guide the fuzzing process, which has achieved good performance. Choi et al. [18] proposed a multivariate static method to extract the protocol specification from the binary protocols used in ICS systems, thus using the protocol specification to guide fuzz testing.

C. ICS PROTOCOLS SECURITY HARDENING
Bagaria et al. [19] pointed out that the ICS legacy systems are inherently insecure, which utilize a large number of proprietary protocols, making the entire system extremely vulnerable to attacks. Therefore, they proposed a security-enhanced protocol version for DNP3, called Flexi-DNP3 (short for Flexible Distributed Network Protocol), which exchanges keys for data encryption during communication. By analyzing the DNP3 protocol, Graham and Patel [20] identified the threats and effective mitigation measures faced by ICS, and proposed the implementation of cost-effective countermeasures, including SSL/TLS, IPsec, encryption, and message authentication. Zhang et al. [21] proposed a series of lightweight anonymous mutual authentication with key agreement protocol on ECC and ARM Cortex-M0. There were also other research work related to ICS protocols. Lin et al. [22] applies Bro to the ICS system, constructs an intrusion detection system based on the DNP3 protocol, and defines the network events related to the protocol semantics. Xu et al. [23] provided a overview of recent advances in PLC attacks and protection technology, detailing some attacks scenarios. Zhou et al. [24] summarized the ICS security strategies of different countries from the perspective of ICS security standards. Related to software or system security, their exist work on the detection or analysis of anomalies or malware with static [25]- [33] or dynamic analysis [34]- [39] or with network traffic [40]- [51]. There also exist work on privacy analysis in smart devices [52], on secure protocols [53], [54] for authentication, or on IoT [55]. However, none of these work focuses on vulnerability analysis.

III. ICS PROTOCOL VULNERABILITY ANALYSIS
Identifying the causes of the protocol vulnerability is a prerequisite for our analysis of the vulnerability. After reviewing considerable literature, we have concluded that the industrial protocol vulnerabilities mainly due to two factors. First, the defects caused by the protocol designer [3], such as not considering the security dimension problem at the beginning of the design, or the logic flaw of the protocol specification itself, etc. Second, vulnerabilities introduced in the development process [2], [6], such as cross-border checks on some boundaries due to the skill level of the programmer.

A. VULNERABILITIES IN DESIGN
There exist big differences between industrial control systems and traditional IT systems shown in Fig. 1. ICS pays more attention to system availability and business continuity. Moreover, the early ICS is generally in a physical isolation situation, and the production environment is relatively closed, and people lacking professional knowledge generally cannot obtain the corresponding ICS attack and defense research environment and related system information. Therefore, at the beginning of the design of the ICS protocols, more consideration was given to the real-time, efficiency and convenience of the protocol, and designers did not consider the related network security risks. They believed that all network communication and communication subjects within the ICS were legal, thus ignoring the basic security attributes of network communication(as shown in Fig. 2). However, as ICS heavily used IP-based control protocols, or migrated legacy serial-based protocols to the application layer of TCP/IP, ICS began to be exposed to the Internet. The outbreak of the 2010 Stuxnet [56] attack marked the beginning of hackers' interest in ICS.
In terms of machine learning in protocol design vulnerabilities analysis, Comparetti et al. [57] used a variety of machine learning algorithms, including sequence alignment algorithm(the NeedlemanWunsch algorithm precisely), partitioning around medoids (PAM) clustering algorithm, Exbar algorithm, sk-strings algorithm, beams algorithm etc., to automatically infer the state machine of a protocol, which is a major improvement on the protocol reverse engineering. Furthermore, the authors themselves designed a state machine extraction algorithm, can extract messages of different types and generate a protocol specification containing a protocol state machine. Finally, the extracted protocol specification can be used as an input to a stateful fuzzing tool to discover security vulnerabilities of the specific protocol. Rrushi et al. [3]studied the design vulnerabilities of the ANSI C12.22 protocol used in smart grid, analyzed the architecture of the protocol, providing details of the vulnerabilities they identified, and conducted a series of exploit experiments to verify those vulnerabilities, and finally provided mitigation measures for these vulnerabilities. Caselli et al. [58] employed machine learning algorithms to automatically extract the BACnet protocol specification documents and convert them into intrusion detection rules to monitor network traffic, which can identify process control errors and potentially dangerous misconfigurations. Zhang et al. [59] carried out in-depth mining of the precise state machine of the protocol, and designed a protocol state machine space mining algorithm based on data packet queries. Through interactive syntax inference technology, it automatically learned to generate the protocol state machine. Shim et al. [60] studied the specification extraction of unknown protocols, using the  Apriori-based CSP(Contiguous Sequence Pattern) machine learning algorithm to extract the protocol common strings, and using the tree structure-based CSP algorithm to extract the static fields of the protocol. It can extract all the static fields that are not used often but are possible. Lin et al. [22] designed and implemented an intrusion detection framework based on protocol specification, developed a new parser that supported the DNP3 protocol, analyzed the industrial control system traffic at runtime, extracted data from network packets, and verified compliance with the protocol specification.

B. VULNERABILITY IN IMPLEMENTATION
According to the vulnerability information reported by VLUHUB [61], the number of vulnerabilities in the ICS system is on the rise (Fig.3). Among them, according to the type of vulnerability, it is obvious that vulnerability in the design takes up only a small part, while the vulnerability introduced by the protocol implementation accounts for a large proportion (Fig.4).
Below we list some common insecure function calls and their solutions in C language, so that programmers can take proper checks on protocol implementation according to the protocol specification, so as to avoid making the same mistakes (Table 4).
Since the implementation of a specific protocol contains a lot of engineering details, which may not be completely consistent with the protocol specifications. It may lead to the occurrence of vulnerabilities. Shu and Lee [62] tested the security of the protocol implementation using supervised machine learning methods, using Symbolic Parameterized Extended Finite State Machine (SP-EFSM) model to extract specific protocol, and then investigated the message confidentiality of the protocol implementation under the general Dolev-Yao attacker model [63]. Kim et al. [64] proposed a new fuzzing test case generation algorithm for the security test of protocol implementation in smart grid . According to the characteristics of the fuzzing test, the protocol fields were divided into three types, which can realize cross-domain and cross-layers test case generation. Zhao et al. [65] proposed a fuzzing test framework called SeqFuzzer, which used a deep learning model to automatically learn the protocol frame structure from communication traffic, processing the temporal features of the stateful protocol, and generating manipulated but seemingly reasonable messages as test cases. The EtherCAT protocol was tested and several vulnerabilities were detected. Niedermaier et al. [66] employed machine learning algorithms to learn the structure of proprietary protocols in industrial control system, and proposed a PropFuzz fuzzing test framework specifically for proprietary protocols. Huang et al. [67] used the improved differential evolution algorithm to improve the efficiency of fuzzing test of protocols in industrial control systems.
This Section analyzes the causes of vulnerabilities in the ICS protocol, including two main factors-vulnerability in design and vulnerability in implementation. A large number of machine learning algorithms are used to analyze these two types of problems, which have been introduced in the previous article. Table 3 provides the summary of this section. This table provides a concise overview of what the focus of the available literature is. The next section is an experiment on the exploitation of some typical vulnerabilities.

IV. VULNERABILITY EXPLOITATION AND ANOMALY DETECTION
Rrushi [68] analyzed the vulnerabilities of the IEC61850 and Modbus protocols and showed how to exploit these vulnerabilities and maximize physical damage. Our work has big difference from his experiments. First, we enumerate the attack surface due to the ICS protocol vulnerability, that is, the possible attack entries and attack scenarios; then we exploit some of the typical vulnerabilities.

A. POTENTIAL ATTACK SCENARIOS
Agostin [69] gave a detailed description of potential points of entry, which is shown in Fig.5 The potential attack scenarios include external networks, infected remote support, modems, diagnostic networks, infected laptops/PCs, unauthorized connections, infected office network, denial of service, print/copy/fax machines, package vendors and 3rd party networks. All of these potential attack scenarios have a lot to do with the protocols' vulnerabilities. As long as attackers can communicate with the ICS network, they can easily implement an attack.

B. PROOF OF CONCEPT
Now, let's conduct exploitation on ICS protocol vulnerabilities. Green et al. [70] employed the testbed environment to conduct man-in-the-middle attack experiments against ICS systems, showing the importance of understanding the process when conducting targeted ICS attacks. However, what if we have little knowledge of the operating mechanism of ICS, and we just employ the ICS protocol vulnerabilities, can we successfully implement a attack? The answer is 'yes'. Now we take Modbus as an example.

1) EXPERIMENT ENVIRONMENT
In order to minimize the destructiveness caused by actual attacks, we use Modbus simulation software [71] instead of real equipment, to conduct attack experiments to explain the existence and severity of vulnerabilities. The simulation suite includes two software-Modbus Poll and Modbus Slave. The experimental framework is shown in Fig.6. Home Version In normal operation, Modbus Slave acts as a server for network communication, listening to port 502 and responding to data requests of Modbus Poll. Modbus Poll's port is randomly assigned by the operating system, in this experiment it is 24547. The initial status is Modbus Poll sending command to read the coil state, and Modbus Slave responding to it. As shown in Fig.7 & Fig.8, the polling cycle is 1000ms.

2) ATTACK PRACTICES
In this section, we launch four attack experiments in order to provide a detail information of communication information exposure, data tampering, illegal function code, and denial of service attack.

No.1. Communication Information Exposure:
Since the protocol does not have an encryption mechanism, all data communication processes can be monitored by a third party to infer some key information of the ICS system communication, such as the port used by the Master, the requested function code, the content of the response, and each coil's actual control state. In this experiment, Wireshark [72] is used to capture network traffic. We can easily find out through the intercepted hands-shake packets(1578-1580) (Fig.9) that the port used by Modbus Master is 24547, whose ip address is 10.10.28.176, and the ip address of Modbus Slave is 10.10.258.122. Through the response packet(No.2333)(10) we can find that the function requested by Modbus Master is 'Read Coils', whose function code is 01H, and the base address of the request is 0, the requested number of the coils is 10, and the unit identifier of the peer Modbus Slave is 1. According to the response packet (No.2334)(11), we can find that the value of bit1, bit3, bit5, bit7, bit9 are all 1, and the rest coils' value is 0. Attackers can use these information to perform targeted strikes in a relatively precise manner, resulting in maximum physical damage.

No.2. Data Tampering Attack:
Since the Modbus protocol does not encrypt and authorize the function codes, we use the laptop to hijack the communication process and send 'Write Multi Coils' command, whose function code is 0FH, causing multi coils' states to change from 0 to 1. If it is in an actual ICS environment, this will cause a couple of switches to be in a closed state and even cause the entire ICS system to crash (Fig. 12).

No.3. Illegal Function Code:
Since the Mdbus protocol does not authorize the function code, we can easily forge the data requests. When the master and the Slave are communicating normally, we can use the laptop to send fake data packets containing illegal function code, causing the real Modbus Master to receive an erroneous response (Fig. 13).

No.4. DoS Attack:
Because Modbus lacks authentication, any machine can communicate with Modubs Slave via port 502. We use the laptop to continuously send data requests to 502 with a shorter polling time, 50ms for example, causing normal Modbus Master service interruption and receive nothing from the Slave (Fig. 14).

C. EXPLOITATION DETECTION
A lot of research has utilized machine learning algorithms to detect the vulnerability exploitation of ICS protocols. Schuster et al. [73] combined protocol-related knowledge and two unsupervised learning algorithms to complete attacks and fault detection in process control communication, to achieve self-learning anomaly detection. Beaver et al. [74] studied the application of multiple machine learning algorithms in detecting command and data injection attack scenarios, detected commands and controls in critical infrastructure facilities, and built models of benign and malicious command traffic to identify potential attack events. Anton et al. [75] employed anomaly detection algorithms based on machine learning and time series, and analyzed the traffic of industrial control networks using two different data sets to find the attack events, and compared the performance of SVM and random forest algorithms. Anton et al. [76] designed a time series-based anomaly detection method, i.e. the Matrix Profiles, to detect attacks in process data in an industrial environment, and compared the performance of the Matrix Profiles and one-class classifiers One-Class Support Vector Machines and Isolation Forest. Bernieri et al. [77] compared and evaluated the performance of anomaly detection machine learning algorithms in industrial control networks, and analyzed the advantages and limitations of two machine learning industrial network anomaly detection methods. Anton et al. [78] used machine learning-based anomaly detection algorithms to detect malicious traffic in Modbus/ TCP communication traffic in virtual industrial scenarios. Supervised learning algorithms including support vector machines (SVMs), random forests, k-nearest neighbors (KNN), and k-means clustering were adopted. Through comparative analysis, SVM and KNN performed better on different data sets. Zolanvari et al. [79] introduced the application of machine learning based models in the Industrial Internet of Things Intrusion Detection System (IDS), and evaluated the performance of machine learning-based anomaly detection system in detecting these attacks against system deployment backdoors, command injection, and structured query language (SQL) injection etc. In response to the difficulty of anomaly detection in industrial control systems, Sokolov et al. [80] supplemented traditional anomaly detection methods and used machine learning-based anomaly detection methods, including the most common techniques for machine learning (decision trees, linear algorithms, support vector machines) and deep learning models (neural networks) and made comparative analysis of different performances Schuster et al. [81] utilized one-class SVM(OCSVM) to industrial control systems to detect anomalies in network traffic, which can be applied to the real-time environment with good performance. Wang et al. [82] reviewed the anomaly detection applications of machine learning in  industrial networks, analyzed the advantages and disadvantages of different machine learning algorithms, and gave the future research trends of machine learning algorithms in the field of anomaly detection in industrial control system. Mantere et al. [83] analyzed the characteristics of network traffic in industrial control systems, and used machine learning-based methods to perform anomaly detection on network traffic in confined environments with good performance.

V. RISK ASSESSMENT
Attacks on ICS protocols are high-impact low-frequency (HILF) events [84], which means that we should make a detailed assessment instead of describing risk as ''probability times consequence''. Fortunately, there are some methods can be exploited to qualitatively or quantitatively make a risk assessment.
The risk assessment of the ICS protocols mainly includes three aspects [85]: the basic security elements, the analysis of threats, and the failure impact, as depicted in Fig.15.

1) FAULT TREE ANALYSIS
Fault Tree Analysis(FTA) [86] takes a top event failure of a system as the analysis target, finds the direct cause of failure, and decomposes from top to bottom, layer by layer, analyzes VOLUME 8, 2020     The fault tree is composed of many different event symbols and logic gates, and the logical relationship between events is represented by logic gates. These symbols can be divided into logical symbols, event symbols, and the like.

a: QUALITATIVE ANALYSIS OF FTA
Qualitative analysis aims to find failure modes that are possible and can cause the top event to occur, and to find all the minimum cut sets (MCS) of the fault [86], as shown in Fig.16. The simplified FTA provides a valuable basis for the designers and analysts to perform a qualitative analysis of the system. Even if the probability of the bottom event is not clear, the analysis of the MCS clearly tells administrator which areas are the weakest part of the system reliability.

b: QUANTITATIVE ANALYSIS OF FTA
Quantitative analysis is based on the probability of occurrence of the bottom event, with a certain degree of confidence to estimate the probability of occurrence of the top event, providing a quantitative basis for reliability design and analysis [86], as shown in Fig.17 and Fig.18.
In general, complex systems are very difficult to achieve the solution and usually requires simplification, so we use independent approximation, taking of all events as  independent, and calculate the probability of the top event occurring from this assumption. There are two models, series model and parallel model. Fig.17 shows a series reliability model consisting of two components, A and B. The probability of success is R = AB, and the probability of system

2) MARKOV MODEL
Markov Model [87] is a statistical model based on stochastic process theory. Its original model is the Markov Chain, which is used to study the state space migration of discrete event in dynamic systems. Markov chain is a Markov process whose time and state are both discrete, abbreviated as X n = X (n), n = 0, 1, 2 . . .
In the process, given the current knowledge or information, the past is irrelevant for predicting the future. At each step of the Markov chain, the system can change from one state  to another according to the probability distribution, and can also maintain the current state. The state change is called a transfer.
The Markov chain is a sequence of random variables X 1 , X 2 , X 3 . . .. The range of these variables, that is, the set of all their possible values, is called the "state space", and the value of Xn is the state of time n. If the conditional probability distribution of Xn + 1 for past states is only a function of X n , then P(X n+1 = x | X 0 , X , 1 , X 2 , . . . , X n ) = P(X n+1 = x | X n ) Here x is a state in the process. The above identity can be seen as a Markov property [88].
As shown in Fig.19, the circle indicates different states, the source of the state transition indicated by the arrow's starting point, the circle pointed by the arrow indicates the destination of the state transition, and the number on each arrow represents the probability of the state transitioning between states. A first-order process with M states has a squared state transition of M. The probability of each transition is called the state transition probability, which is the probability of moving from one state to another. The squared probability of all of these M can be represented by a state transition matrix as following: Using the Markov State Transfer Matrix, we can perform a quantitative risk assessment of the ICS protocols and the whole system.

3) BAYESIAN NETWORK
As mentioned above, the Markov chain describes a sequence of states. However, in many cases, the relationship between things cannot be chained together. At this time, the Bayesian network [89] is used: each state is only related to the state directly connected to it, and is not related to those indirectly connected to it. The topology of the Bayesian network is more flexible than the Markov chain, and is not constrained by the chain structure, which more accurately describes the correlation between events. The Markov chain is a special case of the Bayesian network, and the Bayesian network is a generalization of the Markov chain.
The Bayesian network, also known as the Belief Network, or the directed acyclic graphical model, which is one type of probability graph model. It is an uncertainty processing model that simulates causality in human reasoning. Its network topology is a directed acyclic graph (DAG). Let G = (I , E) denote a DAG, where I represents a set of all nodes in the graph, and E represents a set of directed connected line segments, and let X = (X i ), i ∈ I , For a random variable represented by a node i in a DAG, if the joint probability of node X can be expressed as: Then X is called a Bayesian network relative to a directed acyclic graph G, where pa(i) indicates the ''cause'' of node i, or the parent of node i.
For any random variable, the joint probability can be obtained by multiplying the respective local conditional probability: In fact, the Bayesian network can be seen as a nonlinear extension of the Markov chain. The significance of this feature is to clarify that the Bayesian network can easily calculate the joint probability distribution.

4) ATTACK TREE
The above three methods are concerned about failure scenarios, while attack tree [90], [91] is more concerned about malicious attempts to manipulate a system. The attack tree uses a tree structure to represent the attacks faced by the system, where the root node represents the target being attacked and  the leaf node represents the method of achieving the attack target.
The attack tree has multiple levels of nodes, including root and leaf nodes. The lower level of the root node is the leaf node, and the lower level of the leaf node is still the leaf node. For a leaf node, the lower-level leaf node directly drawn by it is its child node. Naturally, the leaf node is the parent node of its lower-level child node. For example, in Fig.20 below, we can see that the child nodes of leaf node C are leaf node D and leaf node F, then leaf node c is the parent node of leaf node D and leaf node F. In the attack tree, the child node must satisfy the condition that its parent node is true (i.e., node D can cause node C to be true).
Eric J. Byres [92] has utilized attack trees in assessing vulnerabilities in ICS system, which can be depicted in Figure 21.

B. METHODS COMPARISON
Different risk assessment methods have their own advantages and disadvantages and are applicable to different scenarios. Current mainstream risk assessment methods can be divided into two categories: methods based on knowledge reasoning and methods based on pattern recognition. Methods based on knowledge reasoning are the focus of current research and have achieved a lot of research results, which reduce the impact of the researchers' subjectivity on the risk assessment to a certain extent. However, this type of methods are less intelligent and are also limited by the formulation of inference rules and the acquisition of prior probabilities. VOLUME 8, 2020  On the contrary, methods based on pattern recognition are more intelligent, but require a lot of training data to obtain the parameters of the model. A comparative analysis of the listed methods is performed below (See Table 4).
The current risk assessment methods have been applied in the actual security assessment process and have achieved good results. However, With the increasing complexity of the industrial control system and the continuous development of artificial intelligence technology, risk assessment need to be performed in a more intelligent way. The future trend is to use deep learning methods to build a knowledge map and perform correlation analysis based on the protocol vulnerabilities, so as to obtain global security situation awareness of the whole system.

VI. CONCLUSION
In this paper, we analyzed the causes of ICS protocol vulnerability and summarized the two main categories of vulnerabilities-vulnerability in design and vulnerability in implementation. We analyzed some potential attack scenarios and conducted experiments to exploit several vulnerabilities. In addition, we provided the applications of machine learning algorithms on industrial protocols for security analysis, vulnerability exploitation detection, and security assessment. We also provide four methods to perform the assessment of the ICS protocols and make a comparative analysis of these methods. Based on the research work presented in this paper, we conclude that in order to improve the security of the whole ICS system, protocol designers should consider security attributes when design an ICS protocol, whether it is public or proprietary; and protocol developers should conduct sufficient tests such as fuzzing-test before its implementation in practice; and system maintenance personnel should perform comprehensive risk assessment and take appropriate security measures timely. All these aspects of research work, machine learning methods can play a great role, and will play an increasingly important role in the field of industrial protocol security.
XIAOJUN ZHOU received the Ph.D. degree in cyberspace security from the University of Chinese Academy of Sciences, in 2018. He is currently responsible for or participated in several industrial security projects, including a series of major scientific research projects such as the National Natural Science Foundation Projects, the National Key Research and Development Plan, and the Key Research and Development Projects of the Chinese Academy of Sciences. His research interests include the industrial control protocol security analysis, industrial Internet security, and the Internet of Things security.
ZHEN HAN received the Ph.D. degree from the China Academy of Engineering Physics, in 1991. He is currently a Professor with the School of Computer and Information Technology, Beijing Jiaotong University. He has authored or coauthored over 100 papers in various journals and international conferences. His main research interests include information security architecture and trusted computing.
HEQUN XIAN received the Ph.D. degree from the Institute of Software, Chinese Academy of Sciences, in 2009. He was a Visiting Scholar with the College of Information Science and Technology, The Pennsylvania State University. His research interests include cryptography, cloud computing security, and network security.
YA-NAN SONG is currently an Associate Professor with the School of Business, Macau University of Science and Technology, and the Coordinator of International Business Major. Her research has embraced international economics and relations, with a special emphasis on Sino-Lusophone countries economic and trade cooperations. She has actively organized international symposiums on Sino-Brazil Relations and BRICS Institutionalization and planned and managed Business Investment Environments in Lusophone Countries series of lectures and projects. VOLUME 8, 2020


extfieldsofstudy:
Medicine
Computer Science

text:
OSLNet: Deep Small-Sample Classification with an Orthogonal Softmax Layer

A deep neural network of multiple nonlinear layers forms a large function space, which can easily lead to overfitting when it encounters small-sample data. To mitigate overfitting in small-sample classification, learning more discriminative features from small-sample data is becoming a new trend. To this end, this paper aims to find a subspace of neural networks that can facilitate a large decision margin. Specifically, we propose the Orthogonal Softmax Layer (OSL), which makes the weight vectors in the classification layer remain orthogonal during both the training and test processes. The Rademacher complexity of a network using the OSL is only $\frac{1}{K}$, where $K$ is the number of classes, of that of a network using the fully connected classification layer, leading to a tighter generalization error bound. Experimental results demonstrate that the proposed OSL has better performance than the methods used for comparison on four small-sample benchmark datasets, as well as its applicability to large-sample datasets. Codes are available at: https://github.com/dongliangchang/OSLNet.

I. INTRODUCTION
In recent years, due to the advances of deep learning, largescale image classification has achieved massive success [1], [2]. However, in many real-world problems, big data are difficult to obtain [3]- [5]. In addition, when human beings learn a concept, millions or billions of data samples are unnecessary [6], [7]. Therefore, small-sample classification [8]- [10] has received much attention recently in the deep learning community [7], [11]- [15]. However, a deep neural network usually models a large function space, which results in overfitting and instability problems that are difficult to avoid in small-sample classification [16]- [18].
Small-sample classification can be roughly classified into two families depending on whether there are unseen categories to be predicted [19]- [21]. In this work, we mainly focus on the one with no unseen category to be predicted. A key challenge in this direction is how to avoid overfitting. Up to now, many methods have been proposed to mitigate overfitting in smallsample classification, such as data augmentation [22]- [24], domain adaptation [3], [18], regularization [25], ensemble methods [26] and learning discriminative features [27].
Recently, learning discriminative features has become a new trend to improve the classification performance in deep learning. Methods such as the large-margin loss and the virtual softmax method [28] work well on both large-sample and small-sample data. However, these methods either add some constraints on the loss function or make some assumptions on data, which increases the difficulty of optimization and limits the applicable types of data. On the contrary, our goal in this work is to find a subspace of neural networks that can readily obtain a large decision margin and learn highly discriminative features. Specifically, we aim at obtaining a large decision margin through achieving large angles between the weight vectors of different classes in the classification layer (i.e., output layer), in part motivated by the observation that the larger the angles between the weight vectors in the classification layer are, the better the generalization performance is, as shown in Fig. 1.
Therefore, we propose the Orthogonal Softmax Layer (OSL) for neural networks as a replacement of the fully connected classification layer. In the proposed OSL, some connections are removed and the weight vectors of different classes are pairwise orthogonal. Due to fewer connections and larger between-class angles, the OSL can mitigate the coadaptation [29] of a network while enhancing the discrimination ability of features, as we will show in this work. Compared with traditional networks with a fully connected classification layer, a neural network with the OSL has significantly lower model complexity and is ideally suitable for small-sample classification. Experimental results demonstrate that the proposed OSL performs better on four small-sample benchmark datasets than the methods used for comparison as well as its applicability to large-sample datasets.
A number of methods have been proposed to maintain the orthogonality of the weight vectors during the training process of networks [30]- [36]. These methods maintain the orthogonality of weight vectors either for reducing gradients vanishing and obtaining a stable feature distribution [30], [31], [33] or for generating decorrelated feature representation [32], [37]. Unlike these methods, our work does not constrain the optimization process to obtain an orthogonal weight matrix, but constructs a network structure with a fixed orthogonal classification layer by removing some connections so that it can mitigate the co-adaptation between the parameters. The main contributions of this paper are threefold: 1) A novel layer, namely the Orthogonal Softmax Layer (OSL), is proposed. The OSL is an alternative to the fully connected classification layer and can be used as the classification layer (i.e., the output layer) of any neural network for classification. 2) The proposed OSL can reduce the difficulty of network optimization due to militating the co-adaptation between the parameters in the classification layer. 3) A network with the proposed OSL can have a lower generalization error bound than a network with a fully connected classification layer.
II. RELATED WORK Data augmentation. Data augmentation, which artificially inflates the training set with label preserving transformations, is well-suited to limited training data [38], [39], such as the methods of deformation [40], [41], generating more training samples [42], and pseudo-label [43]. However, data augmentation is computationally costly to implement [23].
Domain adaptation. The goal of domain adaptation [44], [45] is to use a model, which is trained in the source domain with a sufficient amount of annotated training data while trained in the target domain with little or no training data [46]- [49]. The simplest approach to domain adaptation is to use the available annotated data in the target domain to finetune a convolutional neural network (CNN) pre-trained on the source data, such as ImageNet [48], [50]- [52], which is a commonly used method for small-sample classification [53]. However, as both the initial learning rate and the optimization strategy of neural networks affect the final performance, this kind of methods is difficult to avoid the overfitting problem in small-sample classification. In addition, the knowledge distillation [54], a kind of method for knowledge transfer, compresses the knowledge in an ensemble into a single model. Overall, this type of methods have some limitations: the original domain and the target domain cannot be far away from each other, and overfitting of neural networks on smallsample data remains difficult to avoid.
Learning discriminative features. There are several recent studies that explicitly encourage the learning of discriminative features and enlarge the decision margin, such as the virtual softmax [28], the L-softmax loss [27], the A-softmax loss [55], the GM loss [56], and the center loss [57]. The virtual softmax enhances the discrimination ability of learned features by injecting a dynamic virtual negative class into the original softmax, and it indeed encourages the features to be more compact and separable across the classes [28]. The L-softmax loss and the A-softmax loss are built on the cross-entropy loss. They introduce new classification scores to enlarge the decision margin. However, the two losses increase the difficulty of network optimization. The GM loss assumes that the deep features of sample points follow a Gaussian mixture distribution. It still has some limitations since many real data are not well suitable to be modelled by Gaussian mixture distributions. The center loss [57] developed a regularization term for the softmax loss function, that is, features of the samples from the same class must be close in the Euclidean distance. In addition to the loss functions above, other loss functions either consider the imbalance of data [58] or the noisy labels in the training data [59]. The focal loss [58] places different weights on different training samples: the samples that are difficult to be identified will be assigned a large weight. The truncated L q loss [59], a noise-robust loss function, can overcome noisy labels in the training data. Unlike these studies for improving the loss function, our method obtains discriminative features by constructing a fixed orthogonal classification layer by removing some connections.
Ensemble methods. The ensemble methods [60]- [64] have been shown to be effective to address the overfitting problem. The SnapShot ensembling [26] only trains one time and obtains multiple base classifiers for free. This method leverages the nonconvex nature of neural networks and the ability of the stochastic gradient descent (SGD) to converge to or escape from local minima on demand. It finds multiple local minima of loss, saves the weights of the corresponding base networks, and combines the predictions of the corresponding base networks. The temporal ensembling, a parallel work to the SnapShot ensembling, can be trained on a single network. The predictions made on different epochs correspond to an ensemble prediction of multiple subnetworks due to dropout regularization [63]. Both the SnapShot ensembling and the temporal ensembling work well on small-sample data. However, generally speaking, using an entire ensemble of models to make prediction is cumbersome and computationally costly.
Regularization. The L 2 regularization method [65] is often applied to mitigate overfitting in neural networks. Dropout [66] mitigates overfitting mainly by randomly dropping some units (with their connections) from the neural network during training, which prevents the units from coadapting too much. Drop-Connect [67] is a variant of Dropout, where each connection can be dropped with probability p. Both approaches introduce dynamic sparsity within the model. The fully connected layer with DropConnect becomes a sparsely connected layer, where the connections are randomly selected during the training stage. In addition, the orthogonality regularization is also a kind of regularization techniques that are able to stabilize the distribution of activation over layers within CNNs and improve the performance of CNNs [37], [68].
In addition to these methods, there exist implicit regularization techniques, such as batch normalization and its variants [69], [70]. Batch normalization (BN) [71] aims to normalize the distribution of the layer input of neural networks, hence it can reduce the internal covariate shift in the training process. Built on BN, the decorrelated batch normalization (DBN) [69] decorrelates the layer input and improved BN on CNNs. Iterative normalization (IterNorm) [70] further improves DBN towards efficient whitening and iteratively normalizes the data along the eigenvectors in the training process. Both DBN and IterNorm adjust the distribution of samples so that features of samples are pairwise orthogonal. Unlike them, the proposed OSL forces the weights in the classification layer to be pairwise orthogonal (Please refer to Fig. 2 for details.) The orthogonality in OSL is to assign the input neurons to different output neurons so that it can mitigate the co-adaptation between the parameters.

III. THE ORTHOGONAL SOFTMAX LAYER
Dropping some connections in the neural networks are adopted by Dropout and DropConnect, as well as the proposed OSL. To make the proposed OSL easy to understand, we first review Dropout and DropConnect.

A. Preliminaries
We denote the input vector and the output vector of a layer in the neural network as v = [v 1 , v 2 , . . . , v D ] T and r = [r 1 , r 2 , . . . , r K ] T , respectively, and denote the activation function as a. Following the formulation in [67], the fully connected layer is defined as r = a(Wv) with weight matrix W.
Based on the above denotations, the fully connected layer with Dropout is defined as r = m a (Wv), where represents element wise product, m is a K-dimension binary vector. The jth element of m, m j ∼ Bernoulli (1 − p), j ∈ {1, 2, . . . , K} and p is probability for dropping a neuron. Moreover, the fully connected layer with DropConnect is defined as r = a ((M W) v), where represents element wise product and each entry of binary matrix M is M ij ∼ Bernoulli (1 − q), i ∈ {1, 2, . . . , D} and j ∈ {1, 2, . . . , K}, and q is the probability for dropping a connection.

B. Mathematical Interpretation of the OSL
To maintain large angles among the weights in the classification layer, we drop some connections in the fully connected classification layer, make the weights in the classification layer be pairwise orthogonal and propose the Orthogonal Softmax Layer (OSL, see Fig. 2). The OSL is defined as where represents element wise product, and M, the mask matrix of W, is a fixed and predesigned block diagonal matrix as where K is the number of classes, M ij is a column vector whose elements are 1, and 0 ij is a zero column vector where every element is 0. The matrix is fixed during the training and test phases. If we consider M W as one matrix, the column vectors are pairwise orthogonal, which is equivalent to introducing a strong prior that the angles between the weights of different categories are all 90 • .

C. Remarks for OSL
Here are some remarks on the OSL. First, the OSL is an alternative to the classification layer (i.e., the last fully connected layer) of a neural network. In contrast, the Dropconnect cannot be effectively used in the classification layer, because if all the connections of a output neuron are dropped, the neural network or part of it cannot be trained.
Second, a neural network with the OSL is a single model throughout the training and test processes, since it first drops some connections and subsequently fixes the structure in both the training and test phases. This is in contrast with the Drop-Connect method. DropConnect randomly drops connections with a given probability during the training phase, but no connection is dropped in the test phase. DropConnect can be considered an implicit ensemble method.
Third, in the OSL, different neurons of the last hidden layer connect to different output neurons. This setup assigns each hidden neuron to one and only one specific class that they are responsible prior to the start of training, so the difficulty level of training the neural network is reduced. Moreover, the solution space of a network with the OSL is a subset of the solution space of its corresponding network with a fully connected classification layer, which implies low model complexity of the former.

D. Implementation of the OSLNet
The OSL can be used in any type of networks for classification, such as the fully connected network or CNN. For convenience, we call a neural network with the OSL as OSLNet.
The OSLNet uses the OSL as the classification layer instead of a fully connected classification layer, and the structure of the other layers are kept the same as a standard network, e.g., a neural network with the fully connected classification layer. Different from the implementation of the fully connected classification layer, the forward computation of the OSL needs to conduct the dot product (see (1)) between the predesigned matrix M (see (2)) and weights matrix W.

E. The Generalization Error Bound of the OSLNet
In this section, we discuss the generalization error bound of the OSLNet in terms of the Rademacher complexity [72], [73]. We define the entire network into two parts: the classification layer and the layers of extracting features. The classification layer refers to the last fully connected layer in a neural network, and the layers of extracting features refer to all layers except the classification layer. Based on the definitions, a standard network with the fully connected classification layer can be represented as f (x; W s , W g ) and the OSLNet can be represented as f (x; M W s , W g ), where W s and M W s are the parameters of the classification layer for the two networks, respectively, and W g are the parameters of the layers for extracting features.
, and H denote a linear transform function H : Theorem 2. (Complexity of OSLNet). Following the notation in Lemma 1, we further letR l (O) denote the empirical Rademacher complexity of an OSLNet. If the weights Proof. First, we denote the empirical Rademacher complexity of a standard network with the fully connected classification layer asR l (O 0 ) =R l (H 0 • G). Since no connection has been removed in a standard network with the fully connected classification layer, H 0 is a linear transform function H 0 : Because in the OSLNet some connections are removed and the weight vectors of different classes are pairwise orthogonal, H becomes a linear transform function H: The analysis above shows that the bound of empirical Rademacher complexity for the OSLNet is only 1 K of that for a standard network. In addition, the empirical error of the OSLNet is close to the standard model in terms of accuracy and cross-entropy loss on the training data, as shown in Fig. 6. Therefore, according to the relationship between a model generalization error bound and an empirical Rademacher complexity (Theorem 3.1 in [72]), the OSLNet has a lower model generalization error bound than the standard network.

IV. EXPERIMENTAL EVALUATION
To evaluate the performance of the proposed OSL, we compare OSLNet with other methods on four small-sample datasets and three large-sample datasets. These evaluation serve four purposes:

A. Small-Sample Datasets
For experiments on small-sample image classification, we selected the following four small-sample datasets: • UIUC-Sports dataset (UIUC) 1    For the 15Scenes and 80-AI datasets, in both the training and test datasets, each class contains 100 samples. For the UIUC and Caltech101 datasets, unlike the 15Scenes and 80-AI datasets, different classes have different number of samples, and we randomly split the data of each class into the training and test sets evenly.
We adopted a CNN feature extractor, VGG16 [77], which was pre-trained on ImageNet. First, we resized the images into identical sizes of 256 × 256 and directly extracted the

B. The Compared Methods and Their Implementation
To evaluate the classification performance of the proposed OSL, we compare the following methods: 1) fully connected network (FC); 2) Focal loss (Focal) [58]; 3) Center loss (Center) [57] For FC, we used a fully connected network with two layers, where the activation functions of the first and second layers are rectified linear unit function (Relu) and Softmax, respectively. FC is optimized by minimizing the softmax cross-entropy loss based on the minibatch gradient descent. The optimization algorithm is the RMSprop with the initial learning rate 0.001, the batch size is 32, and the number of epochs is 100.
For DBN and IterNorm, we placed them before each linear layer of FC. For DBN, we set group-number = 2 for the UIUC and 15 scenes datasets and set group-number = 16 for the 80-AI and Caltech101 datasets. For IterNorm, we set T = 10 and group-number = 8 for all the four datasets.
For Focal, Center, T-L q , and Lsoftmax, we adopted the focal loss [27], center loss, truncated L q loss, and large-margin softmax loss [27] to replace the softmax cross-entropy loss used in FC, respectively. For these four loss functions, we tried multiple sets of parameter values and selected the setting with best performance. Specifically, for Focal, we selected γ = 0.5 for the 80-AI dataset and γ = 0.3 for other three datasets. For Center, we selected a small loss weight, λ = 1e − 10. For T-L q , we set q = 0.5 and k = 0.1 for the UIUC dataset, and q = 0.1 and k = 0.1 for the 15Scenes dataset. However, on the 80-AI and Caltech101 datasets, we did not find a set of q and k that makes T-L q fit the training data. For Lsoftmax, we set m = 2. Other settings were kept the same as those for FC.
For Dropout, we added a Dropout layer after the hidden layer of FC. The probability that a neuron unit should be dropped is 0.5. Other settings of Dropout are identical to FC.
The SnapShot here is a SnapShot ensembling built on the FC network, where the learning rate is learned by using a cyclic cosine annealing method [78], and the number of SnapShots is 2. For OS, we replaced the fully connected classification layer with the proposed OSL in FC and other settings were identical to that of FC. For OS-SnapShot, except for the structure of base network, other settings are identical to that of SnapShot.
All the methods have been implemented with PyTorch [79].

C. Classification Accuracy
We ran FC, Focal, Center, T-L q , IterNorm, DBN, Dropout, Lsoftmax, SnapShot, OS and OS-SnapShot on the UIUC, 15Scenes, 80-AI and Caltech101 datasets for 60 rounds each. The mean and the standard deviation of the classification accuracy are listed in Table I, and the boxplot of classification accuracy is shown in Fig. 3. Larger mean and smaller standard deviation indicate better performance. Table I shows that, on the four datasets, FC is easy to overfit and has unstable performance. Moreover, Focal, Center, and T-L q underperform FC. IterNorm outperforms FC on 80-AI and DNB performs better than FC on Caltech101, and in other cases IterNorm and DBN underperform FC. Dropout performs slightly better than FC on UIUC, competitively with FC on 80-AI, and worse than FC on 15Scenes and Caltech101. Lsoftmax performs better than FC on UIUC, 15Scenes and Caltech101 but slightly worse than FC on 80-AI. SnapShot always has better performance than FC on the four datasets. OS performs better than FC, Dropout and Lsoftmax on UIUC, 15Scenes and 80-AI, showing larger mean and smaller variance. OS performs better than FC and Dropout, but worse than Lsoftmax and SnapShot, on Caltech101. We also evaluated the SnapShot ensembling version of OS, denoted as OS-SnapShot, and it obtains better performance on all the four datasets. Fig. 3 demonstrates that on the UIUC-Sports dataset, the boxplot of OS is more compact than those of FC, Focal, Center, T-L q , IterNorm, DBN, Dropout, Lsoftmax and SnapShot. Moreover, it has no bad-performing outlier. On the 15Scenes dataset, the boxplot of OS is more compact than those of FC, Dropout and SnapShot, but is close to that of Lsoftmax. On the 80-AI dataset, the boxplot of OS is also more compact than those of other methods, and both the central mark and the edges of the box are higher than those of other methods used for comparison. On the Caltech101 dataset, the boxplot  of OS is also more compact and higher than those of FC and Dropout, but is lower than those of Lsoftmax and SnapShot. Finally, the boxplots of OS-SnapShot is always more compact than those of all other compared methods, with both the central mark and the edges of the boxes higher. Table II and Fig. 4 show that, on the UIUC datasets with decreased training set sizes, Dropout shows small improvement over FC. Lsoftmax achieves larger mean and lower variance than FC and Dropout. SnapShot, an ensemble method, obtains larger mean, but the variance is similar to the others. It is encouraging to see that OS has larger mean and lower standard deviation than all the four compared methods on all the different sizes of training sets. OS-SnapShot outperforms OS in terms of the mean accuracy.

D. Classification Accuracy for Different Training Set Sizes
On the 15Scenes dataset, Dropout performs worse than FC, in terms of variance and mean. Lsoftamx consistently performs better than FC. SnapShot shows slight improvement but is worse than Lsoftmax. OS still performs well, as expected. OS-SnapShot improves the mean compared with OS.
On the 80-AI dataset, Lsoftmax and Dropout perform worse than FC. Lsoftmax notably is difficult to converge with the four training sizes. SnapShot performs better than FC, Dropout and Lsoftmax. OS has smaller variances and larger means and performs much better than all other methods.
On the Caltech101 dataset, SnapShot performs better than FC, Dropout and Lsoftmax. OS has smaller variances and larger means than FC and Dropout and has similar performance to Lsoftmax. OS-SnapShot performs the best.
In summary, the proposed OSL performs better than other compared methods on these datasets.

E. Paired Student's t-test
The experimental results presented in the previous sections show that the proposed OSL obtains better performance. To confirm that the improvement is statistically significant, we performed a paired Student's t-test [80] for OS vs. FC, OS vs. Dropout, OS vs. Lsoftmax, and OS vs. SnapShot, and the p-values are listed in Table III. Following [81], we set the significance level as 0.05.
For the tests of OS vs. FC, all the p-values are much smaller than the significance level. Thus, the null hypothesis that FC and OS have the identical mean is always rejected. Likewise, the null hypothesis that Dropout has the identical mean to OS is also rejected.
In terms of Lsoftmax, on the UIUC, 80-AI and Caltech101 datasets, the null hypothesis that Dropout and OS have the identical mean is always rejected. However, on the 15Scenes dataset, the p-values are larger than the significance level in most cases. Thus, on 15Scenes, the null hypothesis that Lsoftmax and OS have the identical mean is generally not rejected.
For SnapShot, on the 80-AI and Caltech101 datasets, the null hypothesis that SnapShot and OS have the identical mean is always rejected. However, on the UIUC and 15Scenes datasets, the null hypothesis that SnapShot has the identical mean with OS is not always rejected.

F. Effect of Changing the Width of the Hidden Layers on OSLNet
In the previous experiments, our method and all the baseline methods used the network structure with 32 neurons in the last hidden layer. To explore the effect of the width of the hidden layer on the performance of OSLNet, we changed the number of hidden neurons in both FC and OS from 16 to 512 on the UIUC dataset, with other settings unchanged. At the same time, we also changed the number of the hidden neurons from 32 to 512 on the 15Scenes dataset, with other settings unchanged. FC and OS were evaluated on the two datasets for 60 rounds, respectively.
From Table IV, we can observe that, with the increase in the width of network, the mean of FC has generally slight improvement on UIUC, and the standard deviation decreases. That is, FC generally performs better when the number of the hidden neurons is increased. In contrast, OS performs better when the number of the hidden neurons is small. Particularly, when the number of the hidden neurons is 16, OS is much  V  COMPARISON OF THE CLASSIFICATION ACCURACIES ON THE UIUC AND 15SCENES DATASETS WHEN WE VARY THE DEPTH OF THE NEURAL NETWORKS.  THE SIZES OF THE HIDDEN LAYERS ARE LISTED. EACH STRUCTURE OF FC AND OS IS TESTED FOR 60 ROUNDS; THE MEAN AND STANDARD DEVIATION  (STD.) ARE LISTED IN THE CELLS OF THE TABLE.   UIUC  Measure  32-8  64-32-8 128-64-32-8 256-128-64-32-8

G. Effect of Changing the Depth of the Hidden Layers on OSLNet
We also evaluate the effect of the depth of the network on OSLNet. In particular, we varied the depth of the network from 2 to 5 layers and from 2 to 4 layers in both FC and OS on the UIUC and 15Scenes datasets, respectively. Each structure of FC and OS is evaluated on UIUC and 15Scenes for 60 rounds. The size of each layer, the depth of each layer, the corresponding mean and standard deviation of accuracy are listed in Table V.
From Table V, we can observe that, on UIUC, the mean values of FC and OS become smaller, when the depth is increased, that is, the performance of both FC and OS decreases, and OS decreases faster than FC. A similar pattern is also found on 15Scenes. Therefore, shallow structures of both FC and OS perform better than deep ones of FC and OS on the two datasets.

H. Effect of Changing Feature Extractor on OSLNet
In all the experiments presented above, we used a pretrained VGG16 as the feature extractor. In this section, we changed the feature extractor to a pre-trained DenseNet121 and ran all the compared methods on the UIUC and 15Scenes datasets for 60 rounds each. The classification results are shown in Table VI. Here, we do not list the performance of T-L q and Lsoftmax, as it cannot fit the training data if the feature extractor is DenseNet121.
From Table VI, we can observe that: 1) On the UIUC and 15scenes datasets, each method performs better with the VGG16 feature extractor than with the DenseNer121 feature extractor. 2) When the feature extractor is DenseNet121, on the UIUC dataset, the proposed OS outperforms all the compared methods, and on the 15scenes dataset, OS underperforms SnapShot and outperform other compared methods. Then we can conclude that OS-SnapShot performs best on both datasets.
In summary, the performance comparision on DenseNet121 is similar to those on VGG16, which further shows the applicability of the OSL.

I. Feature Visualization
To gain insights on the proposed OSL, we visualize the input features of OSL. Take the experiments on the UIUC dataset as an example: the input dimension of OSL is 32, and the output dimension of OSL is 8, as determined by the number of classes. Therefore, according to the design of OSL, each output neuron (i.e., each class) is assigned 4 input neurons. For example, the 1st-4th dimensional input features are for the class 0, and the 5th-8th dimensional input features are for the class 1 (The class labels are from 0 to 7 on the UIUC dataset). We use t-SNE [82] to visualize the input features of OSL in Fig. 5. In Fig. 5, the first column is for the 32-dimensional input features without truncation, and the following three columns are for the 4th-8th dimensional features, the 13th-16th dimensional features, the 21th-24th dimensional features, which correspond to the classes 1, 3 and 5 in the OSL, respectively.
From Fig. 5, it can be observed that, in the first column, the samples from different classes are separate. In the following three columns, the samples of the corresponding class are put to one end of a feature curve or a place far from the features of other classes. A similar pattern appears for other classes in the UIUC dataset and in other datasets. This demonstrates that, in the proposed OSL, the input neurons assigned to each class are indeed responsible for learning discriminative features for differentiating that class from other classes.

J. OSLNet on Large-sample Datasets
To evaluate the applicability of our OSL on large-sample classification, we selected the following three datasets.
• CIFAR-10: This dataset [83] Table VII and demonstrated in Fig. 6. On the CIFAR-10 and CIFAR-100 datasets, for CNN, we used the VGG16 style network, where the convolutional layer has batch normalization, and the fully connected parts have 2 hidden layers of 16 units each. The epoch number is 400, and the learning rate decreases from 0.01 to 0 by using the cosine annealed method. The optimization method iss SGD. For OS-CNN, we only replaced the last fully connected layer with the OS layer in CNN, while other settings unchanged. For CNN-SnapShot, the learning rate decreases from 0.01 to 0 by using the annealed cosine method within 200 epochs, which restarted to the identical process one more time. The total number of epochs is 400, and the number of SnapShot networks is 2. Other settings are identical to those for CNN. For OS-CNN-SnapShot, except for the classification layer, other settings are identical to that for CNN-SnapShot.
On the MNIST dataset, we followed the CNN structure published by PyTorch for MNIST. In the structure, there are two modules including convolution (Maxpooling and Relu activation) and two fully connected layers with 50 hidden neurons. The optimization method remains to be SGD, and the learning rate decreases from 0.01 to 0 as the cosine annealed method is used. The epoch number is 400. For OS-CNN, CNN-SnapShot and OS-CNN-SnapShot, except for the structure of CNN, other settings were the same as that for the CIFAR-10 and CIFAR-100 datasets.
From the classification accuracy shown in Table VII, the curves of the cross-entropy loss, and the accuracy shown in  The left-hand column is for the training data, and the right-hand column is for the test data.  Fig. 6, it can be observed that CNN and OS-CNN have similar performance on the three datasets. That is, the proposed OSL is also applicable for large-sample classification.

K. Discussion
The focal loss places large weights on the samples that are difficult to identify; the center loss constructs a constraints that the features of samples from the same class must be close in the Euclidean distance; and the truncated L q loss is a noiserobust loss. In the experiments above, the three loss functions are not effective on the four small-sample datasets. It can also be observed that IterNorm and DBN perform unstably, which may be because, while accelerating optimization of neural networks, they do not have any particular mechanism to improve the classification performance of networks.
Among all the compared methods in the experiments on small-samples datasets, Dropout is an implicit ensemble method: in the training process it trains many subnetworks of the original network, and in the test phase no neuron is dropped. On the four small-sample datasets, Dropout do not show remarkable advantages over the network without dropouts.
Lsoftmax introduces a large margin into the cross-entropy softmax loss function to learn more discriminative features.
The key problem of this method is that it is not easy to converge. Thus, it does not perform well in some experiments with a reduced training size. In contrast, the proposed OSL method converges easily.
The SnapShot is a strong baseline among the compared methods and obtains relatively larger mean values and relatively smaller variances. However, although the method is trained only once in the training process and combines the predictions of all SnapShot networks in the test phase, due to the correlation of the base networks, the SnapShot increases the performance of FC slightly.
The proposed method on small-samples datasets shows higher accuracy and better stability, which are mainly attributed to the OSL, where some connections are removed and the angles among the weights of different classes are maintained as 90 • from the beginning to the end during training. Having large angles among the weights of different classes in the classification layer is an important precondition to obtain a decision rule with a large margin, when the L 2 norms of the weights are not considered. In addition, which class each neuron of the last hidden layer should serve exclusively is determined prior to the start of training, so the difficulty of training can be significantly reduced. The experimental results of changing the width and depth of the network suggest that when a thin and shallow structure is selected, the OSL can obtain a better performance. In addition, experimental results of our OSL on the three large-sample image datasets show that, although developed for small-sample classification, OSL can also be well applied to large-sample classification.
Even though OSL has demonstrated superior performance, it has its own limitations. For example, due to the design of OSL, the number of neurons of the last hidden layer should be larger than the class number. Therefore, when the class number is large, e.g., 1000, a large number of neurons will be required, which will increase the flexibility of network. We leave it as an open problem for the future.

V. CONCLUSIONS
In this paper, we proposed a new classification layer called Orthogonal Softmax Layer (OSL). A network with OSL (OSLNet) has two advantages, i.e., easy optimization and low Rademacher complexity. The Rademacher complexity of OSLNet is 1 K , where K is the number of classes, of that of a network with the fully connected classification layer. Experimental results on four small-sample datasets provide the following observations for an OSLNet in small-sample classification: 1) It is able to obtain higher accuracy with larger mean and smaller variance than those of the baselines used for comparison. 2) It is statistically significantly better than the baselines. 3) It is more suitable for thin and shallow networks than a fully connected network. Further experiments on three large-sample datasets show that, compared with a CNN with the fully connected classification layer, a CNN with the OSL has a competitive performance for both training and test data.