Scientific Research Project 1

profileSadooh_77
hJlvTm-ContentServer.asp.pdf

Web Intelligence and Agent Systems: An International Journal 12 (2014) 375–388 375 DOI 10.3233/WIA-140301 IOS Press

Detecting cyberbullying in social networks using multi-agent system Vinita Nahar a,*, Xue Li a, Hao Lan Zhang b and Chaoyi Pang b,c a School of Information Technology and Electrical Engineering, The University of Queensland, Australia E-mail: [email protected]/[email protected], [email protected] b NIT, Zhejiang University, Ningbo, Zhejiang Province, China E-mail: [email protected] c Hebei Academy of Sciences, Hebei, China E-mail: [email protected]

Abstract. State-of-the-art studies on cyberbullying detection, using text classification, predominantly take it for granted that streaming text can be completely labelled. However, the rapid growth of unlabelled data generated in real time from online content renders this virtually impossible. In this paper, we propose a session-based framework for automatic detection of cyber- bullying within the large volume of unlabelled streaming text. Given that the streaming data from Social Networks arrives in large volume at the server system, we incorporate an ensemble of one-class classifiers in the session-based framework. System uses Multi-Agent distributed environment to process streaming data from multiple social network sources. The proposed strategy tackles real world situations, where only a few positive instances of cyberbullying are available for initial training. Our main contribution in this paper is to automatically detect cyberbullying in real world situations, where labelled data is not readily available. Initial results indicate the suggested approach is reasonably effective for detecting cyberbullying automatically on so- cial networks. The experiments indicate that the ensemble learner outperforms the single window and fixed window approaches, while the learning process is based on positive and unlabelled data only, no negative data is available for training.

Keywords: Cyberbullying detection, semi-supervised learning, positive unlabelled learning, text-stream classification, social networks, multi-agent

1. Introduction

Social networks, including Twitter and MySpace, are presently extremely common sites for sharing information, creating relationships, friendships and chatting in general. Being sociable on the Inter- net is an extremely common activity for youngsters. However, such methods of communicating with your peers comes with certain drawbacks, such as com- mon breaches of accepted ethical behaviour as a re- sult of many types of online abuse, including becom- ing a target for cyberbullying and harassment online. These days cyberbullying is an increasing worry, es-

*Corresponding author. School of Information Technology and Electrical Engineering, The University of Queensland, Bris- bane, QLD 4072, Australia. Phone: +61-7-33651187, E-mail: [email protected].

pecially among younger age groups. Cyberbullying is defined as “an aggressive, intentional act carried out by a group or individual, using electronic forms of con- tact, repeatedly and over time against a victim, who cannot easily defend him or herself” [21]. Studies in- dicate that the number of youths who take part in cy- berbullying with a view to hurting other people [4,27] together with the outcomes of cyberbullying have the potential to be more grave than traditional face to face or school bullying [4]. When compared to verbal bul- lying, which a target victim would forget, words used in cyberbullying remain a constant reminder to all the people involved such as, bully, bystander and victim as messages are not deleted. The outcome of cyber- bullying for the person on the receiving end can be suicide [9], anxiousness, depression and low sense of self-worth [11].

1570-1263/14/$27.50 c© 2014 – IOS Press and the authors. All rights reserved

376 V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system

While cyberbullying may be in the spotlight where Social Science research is concerned, far less atten- tion has been paid from the point of view of actu- ally finding a solution for the automatic detection of such behaviour. Existing studies in this field consider the detection of cyberbullying under supervised learn- ing as a two-class or multi-class classification prob- lem. In these instances, plenty of positive and nega- tive training examples are needed for efficient and ac- curate performance classification. Although cyberbul- lying has increasingly become a problem within on- line communities, basically the offending content is neither classified nor labelled. This makes the inves- tigation on cyberbullying quite a challenge. Further, it is impractical to manually identify and label cyber- bullying messages for training due to expensive man- ual labelling process in terms of time and effort. As a consequence of the rapidly increasing online stream- ing text, where contents are little or not at all labelled, makes supervised approaches impractical for the au- tomatic cyberbullying detection on Social Networks. In comparison to current methods of cyberbullying de- tection, which need sufficient amount of both negative and positive instances for effective training, our inten- tion is to focus on constructing a classifier from a min- imal instances of positive training set, while remain- ing overall data is unlabelled and, there are no negative instances are available for training. In this work, we assume that it is feasible to extract web history from the server computer to create a small set of positive instances or cyberbullying posts for initial training by hand-labelling. In the paper, we propose a one-class classification scheme in a session-based system of un- labelled text streams to construct an automatic classi- fier while there are no negative samples available to help with training. To build the proposed session-based framework, the following challenges have been identi- fied:

– Insufficient positive training examples: As an al- ternate to manually labelling of a huge amount of streaming data, only a small number of positively labelled instances are provided for the system.

– Insufficient negative training examples: Collec- tion of a sufficient number of strong negative ex- amples for training is a labour intensive and time consuming task. In the context of cyberbullying, labelling negative examples is subject to personal opinion because these can be any normal post.

– Rare occurrence of cyberbullying instances: In relation to the overall amount of data, occurrences

of cyberbullying instances are rare, which makes the automatic training of the classifier very diffi- cult.

– Data distribution variation: We observed that the distribution of data in positive instances is dif- ferent from overall unlabelled instances. Charac- teristics of data from difference social networks varies, which varies the data distribution with re- spect to data sources. It is challenging when the available positive examples in the training set and the positive examples in the unlabelled streaming text may not belongs to the same distribution.

The aim of a one-class classifier is to discriminate one class of objects, i.e. the target class, from all other possible objects, by learning from a training set con- taining only the objects of the targeted class. The de- scription of the target class should be created in such a way that the likelihood of inclusion of any other ob- jects can be minimised. We incorporate a list of swear- keyword as an indicator for the potential existence of cyberbullying in a one-class classification scheme. We process the streaming text arriving from the Social Networks with a high speed at the system in sessions. A session is defined as a chunk of memory block that is used to process incoming streaming text. Each session is processed by the one-class classification scheme to classify if a post in the current session is cyberbullying or not. The newly classified cyberbullying instances will be included with the initial training set examples. Our intuition to employ the one-class scheme is that in the absence of sufficient training, the proposed ap- proach will extract reliable negative and more strong positive instances from each incoming session auto- matically. Ensemble of one-class classifiers will ex- tract training from the incoming unlabelled sessions by learning from minimal numbers of positive instances which are available for initial training and no nega- tive instances are given for training. In this paper, we compare the proposed ensemble-based algorithm with baseline single window and fixed window memory management techniques. The experimental results in- dicate the effectiveness of the proposed session-based one-class ensemble framework when combined with the swear-keywords list for cyberbullying detection. Our contributions can be summarised as follows:

– A novel cyberbullying detection approach is pro- posed under a text streaming scenario and using a one-class classification technique to detect cyber- bullying instances, both effectively and automati- cally.

V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system 377

– We propose a session-based framework to auto- matically detect rare cyberbullying instances by an ensemble of cyberbullying for training. In ad- dition to the one-class classifier scheme, a swear- keyword list is used during feature space design.

– The experimental results indicate that the pro- posed session-based one-class classification scheme can tackle rare cyberbullying instances effectively with the help of only a small number of positive training items.

The reminder of this paper is organised as follows. In Section 2, we present the review of critical liter- ature, and Section 3 discusses the proposed method- ology. Section 4 explains how experiments are per- formed – the results are also discussed here. Conclu- sions and future work are discussed in Section 5.

2. Related work

2.1. Cyberbullying detection

Recently, Xu et al. exploit regret in bullying mes- sage [25]. The intuition is that people who post bul- lying related tweets may later experience regret, pos- sibly delete those posts. Their model periodically ob- serves the survival of the tweet to find if and when tweets become deleted. Through the exploratory anal- ysis on the factors associated with deleted posts, they performed prediction on the construction of regret- table tweets. In another study, Dadvar et al. study utilised gender-specific features for detecting cyber- bullying in a MySpace dataset [5]. SMV classifier was trained on both male and female written posts of the 34% female and 66% male users. The gender ratio outcomes showed an improved performance over N- grams, TF-IDF, and the frequency of swear-keywords usage, as feature sets. In the follow-up work, Dad- var et al. demonstrated the improved performance by utilising content-based features, cyberbullying features and user-based features to detect cyberbullying under supervised learning [6]. Yin et al. used content in- formation only from online forums for the identifi- cation of harassment posts [28]. They proposed con- textual features based on the similarity measure be- tween posts. They hypothesised that those posts which were substantially different from others were more likely to be harassing posts. The work incorporated topic models such as PLSA [10] and LDA [3], fea- tures that are generated under pre-defined topics, and then only features under cyberbullying-like topics are

selected [18,19]. Further, in order to identify preda- tors and victims, users involved in cyberbullying mes- sages are ranked as the most influential predators and the most offended victims through a graph model [19]. Dinakar et al. broke down the detection of cyber- bullying in to the sensitive-topics detection such as, sexuality, race, intelligence, and profanity. These top- ics are likely to result in cyberbullying discussions through various binary and multiclass classifiers [7]. Their findings indicate that binary label-specific classi- fiers outperform multi-class classifier. However, these cyberbullying detection techniques are modelled on a limited set of manually-labelled data under the um- brella of ‘supervised learning’, while largely ignoring the fact that the Social Networks’ data is not labelled as such. In this paper, we propose semi-supervised learn- ing by constructing a one-class ensemble learner.

2.2. Semi-supervised learning for test classification

In this paper on cyberbullying detection, we mainly focus on one-class classification schemes for PU-based semi-supervised learning. The PU-based learning is mainly centred on the availability of training data. In this section, we discuss current trends of one-class classification applied in various scenarios for the text classification. We present taxonomy of one-class clas- sification as shown in Fig. 1. The state-of-the-art re- search on text classification utilised a one-class clas- sification technique in varied yet interlinked scenar- ios. Therefore, we focused our discussion of one-class for web documents classification and streaming text classification based on the availability of training data and methods used for learning. Certain approaches concentrated on keyword labelling rather than train- ing sample labelling [12,14,16,20,26]. McCallum & Nigam (1999) initially provided sufficient keywords for each class manually, which were then used to ex- tract training samples [16]. Then the NB-EM algo- rithm was used to construct final classifiers. Liu et al. (2004) extrapolated this approach by creating clusters of unlabelled documents so as to label descriptive key- words in every individual category [14]. While this may lessen the burden for the user to input keywords initially, it requires additional relevant or representa- tive words for an appropriate cluster’s description. Fur- thermore, this method utilised a static keyword list that doesn’t consider for addition of new keywords the fur- ther extension of keyword list. Where classifying any text was concerned, it was suggested that the title word for each category and documents which were unla-

378 V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system

Fig. 1. One-Class Classification Taxonomy.

belled was recommended. For text classification, some authors proposed to utilise the title term of each cat- egory and unlabelled documents [12,20,26]. The la- belling of texts was done using a bootstrapping algo- rithm with the feature projection method to produce an effective classifier [12]. Qiu et al. (2009) utilised WordNet and extended keywords to obtain appropriate samples [20]. Further DocMine algorithm [2] is used to obtain positive keywords after which the PNLH (Positive examples and Negative examples Labeling Heuristic) algorithm [8] was applied to extract further positive samples. The final classifier was constructed using the up-to-date PU learning algorithm. As con- trast to utilising the single keyword-based method [20], Yang et al. proposed utilising three keywords to avoid polysemy [26]. However, when cyberbullying detection is concerned only keywords based training such as swear keywords is insufficient, because swear words can be used in any context not always relating to particular person e.g. the fu**ing car. In addition to swear-keywords, there are other features including personal pronouns such as ‘you’, ‘yours’, etc. that can be useful in correctly detecting cyberbullying post. As the use of personal pronouns closer to a swear key- words in a post will probably give an indication that the post could contain some cyberbullying, i.e. “You are a bastard, f*** off!” Xiao-Li Li et al. proposed Learning from Probabilistically Labelled Positive ex- amples (LPLP) and apply the approach to classify

product pages from commercial websites [13]. They have shown improved performance, even if the posi- tive examples in P and the hidden positive examples in U were not drawn from the same distribution. More recently a number of advanced algorithms have been proposed to construct text classifiers from positive and unlabelled data only [8,29]. Fung et al. [8] extracted reliable negative examples from unlabelled data using their proposed function to automatically measure the feature strength H(fj ) of feature fj in the absence of prior knowledge by normalising P and U documents that contains fj as shown in Eq. (1):

H(fj) = nP (fj) − minP maxP − minP

− nU(fj) − minU maxU − minU

(1)

In Formula 1, maxP and minP are the maximum val- ues and minimum values of nP (fj ) for fj ∈ P , similar formula belongs to maxU and minU . How a reliable P is chosen can be given as:

θ = 1

N

fj∈P H(fj) (2)

While this is an effective approach when Pn is min- imal, its feature extraction process erroneously classes detection number of negatives and positives as in- stances of cyberbullying. The reasoning can be put down to: (i) The PNLH method is applicable in do-

V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system 379

mains where user interest is less dynamic in rela- tion to the cyberbullying domain (ii) Experiments are conducted on the 20NewsGroup data and this data is in a standard set, which is predominantly complete, comprehensive and less noisy. Although this approach is robust when Pn is very small, given the fact that the data is streaming from Social Networking sites such as Twitter, MySpace etc., its feature extraction process wrongly classifies many negatives as posi- tives and some positives as negatives for cyberbul- lying detection. The reasons can be summarised as: (i) PNLH method is applicable in domains, where user interest is less dynamic as compared to the cy- berbullying domain (ii) Experiments are conducted on the 20NewsGroup data1 and this data is in a standard set, which is mostly complete, comprehensive and less noisy. Whereas, characteristics of Social Networks’ data are: very noisy, incomplete sentences, curt sen- tences, spelling errors, the choice of words used in a message and multiple topics discussed in one single thread. Therefore, given the context of cyberbullying detection in online social networks, we propose to ex- tend this model in a session-based scenario by incor- porating swear-keywords in a one-class classification ensemble approach.

3. Cyberbullying detection framework

3.1. Session-based system for streaming text

In order to discover cyberbullying instances in the streaming text, we propose a session-based framework as shown in Fig. 2. System composed of four major processing units. Stage 1 is a data processing agent. The data generated from different social networks is huge and varies in structure. A multi-agent architecture is used to process social network data. As shown in Fig. 2, Layers (1), (2), and (3) represents multi-agent system including agent layer, server layer and main data processing unit. Stage (1) represents local web crawler agent for each social network source. Each so- cial network will have a specialized web crawler agent to process streaming data. Starting points for crawler agent is known as seeds pages, which are based on the location such as, the USA, Australia etc. The web crawler agent will address issues such as, how data server interpret data from existing streams that might be provided by other web agents? What type of meta-

1http://kdd.ics.uci.edu/databases/20newsgroups/20newsgroups. data.html

information is necessary to make sure the information is useful to data server for cyberbullying detection? Stage (2a) is a server layer, which will communicate between web crawler agent and main data processing unit. Distributed server architecture is needed to sup- port system failure. If one server will fail, load can be transferred to another server. Main data server (2b) will collect and process only useful information for cy- berbullying detection, which includes generic parse to process structured information collectively. Data pre- processor is used to improve the quality of the data re- ceived from the generic parser which then feed to the learning algorithms. Stage 3 describes session segmen- tation. Given that the text streams arrive on the server system at a high speed, we process the data in sessions. We use time interval (t) to describe session length, in our case t can be greater than or equal to 2 minutes (t � 2) depending on the user defined parameter. Thus, session consists of high speed streaming text of vari- able length depending on the value of t, as represented by Eq. (3) [17,30]:

S1 : b11, b12,b13, . . . , b1m1;

S2 : b21, b22,b23, . . . , b2m2;

. . . ;

Sn : bn1, bn2,bn3, . . . , bnmn

(3)

In the Eq. (3), Si represents the ith session, where i ∈ {1, . . . , n}. Each session consists the informa- tion of posts and labels which can be represented as Si = 〈Bij, yij〉. In the sessions, Bij ∈ Rn is a mes- sage available in the ith session and yij = +1, Un is the associated labels with each post. Here, yij = +1 indicates a positive post while yij = Un represents an unlabelled message.

Some cyberbullying instances (Pn) and swear- keyword (Kp) list are provided to the system for the initial training. Table 1 presents some examples used for Pn. Stage 3 implements one-class classification scheme. The one-class classifier will discriminate tar- get class, which is cyberbullying samples from all other unlabelled data of the current session by learn- ing from a training set containing only the target class examples. For every session a ensemble stacking tech- nique is used to learn the importance of the base clas- sifier as shown in Stage 4. Details of each step of Stages 3 and 4 are described in the form of algo- rithms.

Algorithm 1, indicates the overall framework for the proposed session-based system. Step 1 is data

380 V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system

Fig. 2. Multi-agent system architecture for cyberbullying detection in streaming text. (1): Agent layer, each social network source will have a local web crawler agent. (2a): Server layer, distributed server architecture will communicate between Agent and data server. (2b): Data server, will provide structured information in unique format 〈time, user, post, age, gender, location〉 to cyberbullying data processor. (3): Session segmentation unit, based on the time, sessions containing unlabelled messages will be processed. (4a): Tn, is an extraction and enlargement of training phase, which is a core cyberbullying detection unit. (4b): En, ensemble stacking learner to store final cyberbullying learned models. Ensemble learner will be used to predict cyberbullying instances in the streaming text.

Table 1 Instances used for initial positive training, Pn

S. No. Post Class (Y)

1. When you look in the mirror do you hate how effeminate you look? Seriously, that must be it. BTW: stuffing your face with donuts all day just makes you look like a fat dyke, go easy on that shit holmes.

Y

2. Aren’t you already a lesbian? Y

3. “She’s basically a who*e” Y

4. The only thing that’s occurred to me in watching you post is that you’re a legitimate psycho and I’m glad you live in the country’s arse rather than near me.

Y

. . . . . . . . .

V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system 381

Algorithm 1: Session-based ensemble classifier for cyberbullying classification

Input: Pn: Small set of positive instances available for

initial training; Un: Set of unlabelled instances of the incoming

session; En−1: Classifier’s ensemble of the previous session; Kp: Keywords list;

Output: En: Classifier’s ensemble of the current session;

1. Data pre-processing and TF-IDF (Session); 2. En−1 ← Pn; initialize En−1 with Pn; 3. //Extraction step:

Tn, Compute reliable negative/positive instances from Un via one-class classifier using Pn;

4. //Enlargement step: Tn ← TnUPn;

5. Train E (classifier’s ensemble) with Tn; 6. En ← En−1UE; 7. U′n ← Un − Tn; 8. Classify Un’ by En; 9. En ← update En by re-ranking classifiers of En; 10. return En;

pre-processing, where the well-known Bag-of-Words (BoW ) model is utilised to obtain features, and we chose to use the TF − IDF weighting scheme to rep- resent data as an input to the algorithm. TF − IDF gives relevant weight to each term at a local and global level, which is based on the frequency of terms in pos- itive and unlabelled data as:

TF − IDFij = TFij.IDFi (4)

TFij is the importance of word i in post j:

TFij = nij∑ l nlj

(5)

where, nij is the number of the term i in post j and denominator is the total number of terms(l) in post j

IDFi = log B

1 + |bj : fi ∈ bj| (6)

where, |B| is the total number of posts arriving on the system and the denominator is that number of posts which have the term fi. Consequently, terms with ex-

cellent powers of discrimination between cyberbul- lying and non-cyberbullying posts will obtain higher IDF scores. We anticipate these terms will likely in- clude cyberbullying-like words, which can be seen in both cyberbullying and normal instances, however popular usage which appears in many posts, but which doesn’t have any usable discrimination information, receives a lower IDF score. In this work, we have up- dated the TF − IDF value after the arrival of each new session.

At Step 2, the ensemble is initialised with the very small set of positive bullying instances Pn. Initial Pn can be achieved by extracting the web history of the survey computer and manual labelling. We used only 155 manually labelled positive cyberbullying mes- sages for the initial training of the classifier. In Step 3, we extracted reliable negative instances from the cur- rent session containing unlabelled streaming data by incorporating the swear-keyword list (Kp) and one- class classification approach [8]. This method sub- sequently extracts more reliable negative and strong positive instances from remaining unlabelled data of the current session. Step 4 is an enlargement process where extracted reliable training instances from the current session are added to the previous training Tn. Step 5 is a training stage, which is explained in Al- gorithm 2 and Step 6 adds newly trained classifiers to the current ensemble. Step 7 represents remaining un- labelled data of the current session. Step 8, the newly built model (En, ensemble of classifiers), is utilised to compute the class label of U′n. Here we selected to utilise ensemble-base classifiers under concept drift [22,24,30,31]. Concept drift is employed to capture positive features in the current session. Our intuition to use concept drift for learning the importance of base classifier is that it would assist to capture the changing or emerging bullying-like words. Zhang et al. (2008) summarised the following formula to predict the class label as:

En(s) =

|En|∑

i=1

αici(s) (7)

where s is a given unlabelled instance, ci is the ith base classifier in ensemble En and αi ∈ R, (1 < i < En), is the significance of ci (ith base classifier).

In Formula 7, according to Street & Kim (2001), αi ∈ {0, +1} for majority voting [22] whereas αi rep- resents the accuracy of ci, for accuracy weighted vot-

382 V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system

Algorithm 2: Base classifier training

Input: Tn: Training for current session; En−1: Ensemble of the classifier of the previous

session; Kp: Keywords list;

Output: En: Ensemble classifiers from the current session;

1. T ← TnUKp; 2. Train C by T ; 3. T ← LatestMSession(Tn); 4. Train C′ by T ; 5. En ← {C, C′}; 6. return En;

ing [24]. Zhu et al. (2004) defined ∑|En|

i=1 αi = 1, αi ∈ {0, +1} for the dynamic classifier selection [31].

In this paper, we chose to learn the importance of a base classifier for classification using the ensemble stacking learner proposed by Zhang et al. (2008) un- der concept drift [30]. Finally at Step 9, unlike con- cept drift which generally deletes weak classifiers, the classifiers were re-ranked as weak classifiers can still include some useful information for detecting rare in- stances of cyberbullying. Weak classifiers are an ap- pended at the end of ensemble En.

Algorithm 2 explains base classifier training on the current session. The base classifiers of the current ses- sion will be trained in the absence of labelled data in streaming text. In this paper, we use swear-keyword list Kp as a unique feature set. The presences of swear words such as ‘f**k’, ‘bullshit’, ‘stupid’ etc., in the contents increases the likelihood of a potential bully- ing post. All the keywords in the message are grouped together and are represented in a normalised form as a unique feature set. In the framework, we will train two base classifiers, {C, C′}:

– C, trained on Tn and Kp, where Tn is the training extracted from the previous session and Kp is a swear-keyword list. Swear-keywords are utilised to improve the performance of the one-class clas- sifier;

– C′, trained on the swear-keyword list, Kp only.

At Step 1 and 2, the initial base classifier, C will be trained with Tn ∩ Kp. At Steps 3 and 4, the second base classifier will be trained, with the LatestMTraining set. Here, we have to stress that the LatestMTraining set is based on the re-ranked

Algorithm 3: Base classifier selection in Ensemble

Input: Tn: Training for current session; En−1: Ensemble of the classifier current session; ENSEMBLE_SIZE, parameter;

Output: En: Ensemble of classifiers;

1. //Selection M latest training set via one-class ensemble stacker model;

2. Ts = LatestMSessions(Tn); 3. //Sorting in decreasing order 4. if (S �= φ) then 5. S = Sort(ci) by PPR(ci) 6. En = En + S (ENSEMBLE_SIZE); 7. return En;

base classifiers in En. At Step 5, the final base clas- sifier will be selected by ensemble stacking learner, which is explained in Algorithm 3.

The base classifier selection in an ensemble is vital as the size of the ensemble increases with the addition of newly built base classifiers from the arriving ses- sions. The proposed algorithm for base classifier selec- tion in an ensemble of the classifiers, En consists of base classifier selection up to ENSEMBLE_SIZE, and sorting of the base classifiers in the ensemble is performed based on re-ranking, where weak classifiers ranked lower in the ensemble En.

In Algorithm 3, ENSEMBLE_SIZE is a user- defined parameter, which defines ensemble size to keep the list of classifiers below a certain thresh- old. Then, because of one-class classification, we sort the base classifiers based on the accuracy of positive instances. Step 2 shows the selection of LatestMTraining set. For our framework stacking training set (Ts) can be defined as:

Ts = LatestMSessions(T) (8)

where we select latest M training sets from Tn. Step 4 shows sorting of ci in S (base classifier of S) in de- creasing order.

In Step 4, En is accumulated with base classifiers below threshold. To calculate the Positive Prediction Rate (PPR) by ci, we use the positive prediction func- tion defined for one-class classification [30] as below:

PPR(ci) =

∑n j=1 PositivePrediction(ci, j)∑n

j=1 |dj| (9)

V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system 383

where PositivePrediction(ci, j) stands for the num- ber of correctly predicted positive instances by ci in sn.

3.2. Learning from positive instances by extracting keywords

Given that the initial positive training and the latent positive instances in overall unlabelled were not drawn from the same distribution (LPLP ), we assume that the presence of keywords indicates that instance might belong to the positive class. According to the one-class classification scheme, our target is to construct bound- ary in the feature space to separate volumes of high density of the target class objects from volumes of low density of the target class objects to discriminate target class objects from all other data points [23]. We con- struct such a high volume plane by enlarging positive training sets and by extracting latent keywords from the unlabelled data. LPLP is a similar concept but we extend it by introducing keywords and through the ex- periments in that section show that how LPLP alone is unable to perform in the absence of keywords at the initial training phase.

Algorithm 4 describes general framework of extract- ing emerging and new keywords, K′′p , by learning from positive training, Pn only. Emerging keywords repre- sents newly extracted keywords which are not present in Kp, but they are drawn from the same distribution. In general, extraction step shows how new keywords are extracted from Pn, and in enlargement step we enlarged training set T ′′n form Un using updated Kp (Kp + K′′p ). Step 1 is an initialization step, and Step 2 is a data pre-processing step where feature vector is created. At Steps 3 and 4, we compute the count of the words appears in Pn. While Step 5 computes the word feature weight using TF − IDF , where local weight is calculated based on the frequency of the work in Pn only. Step 6 sorts the feature weight in descending or- der, while at Step 8, K′′p is built by adding Top-k newly extracted K′′p . At Step 10, enlarged training set, T

′′ n and

poslike are initialised to an empty set. poslike repre- sents the positive representative document, which con- sist of the updated K′′p at Step 11. At Step 12, using cosine similarity all the instances of Un are compared with poslike, where m stores the maximum value. Step 13, computes P(+|bi) and updates T ′′p with in- stances having high probability values (newly identi- fied T ′′p ), while neg with the low probability values.

Finally, Naïve Bayes classifier is built to classify latent positive instances in Un as shown in equa-

Algorithm 4: Classification by Extraction of new-Keywords via One-class classification

Input: Pn: Small set of positive instances available for

initial training; Un: Set of unlabelled examples session; Kp: Keywords list; K: size of Kp, parameter;

Output: K′′p : Set of new-keywords from Un; T ′′n : Set of new-keywords from Un;

1. K′′p �= φ; neg �= φ; total �= φ. Initialize keywords list, extracted negative training, and total with null; 2. fi = Pre-processing(Un); 3. //Extraction step

N(fi, Pn) = ∑|Pn|

j=1 N(fi,bj)

maxfi(N(fi,bj)) ∀fi;

4. total+ = N(fi, Pn); 5. W(fi) =

N(fi,Pn) total

∗ IDFfi ; 6. Sort(W(fi)); 7. for Top − K; 8. if (!L(fi) == Kp)

K′′p = K ′′ p Ufi;

9. //Enlargement step: enlargement of positive training, Pn with the help of newly built Kp”

10. T ′′n = φ; poslike = φ; neg = φ; Initialize enlarged training set and poslike with φ;

11. poslike+ = K′′p ; 12. ∀bi ∈ Un

m = maxbi(sim(poslike, bi)); 13. ∀bi ∈ Un

if (sim(poslike, bi) > 0) P(+|bi) = sim(poslike,bi)m ; T ′′p = T

′′ p Ubi;

else neg = negUbi;

14. return K′′p , T ′′ n ;

tions, which iterates between the Expectation (E) and Maximisation (M) steps until it converges. E-step computes the posterior probability for latent variables based on the initialised parameters, and M-step up- dates the parameters based on the posterior probabili- ties computed in the E-step.

Expectation (E) step: based on the Bayesian proba- bility and the multinomial model [15], we have

384 V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system

P(cj) =

∑ b∈B P(cj|bj)

|B| (10)

and with Laplacian smoothing,

P(ft|cj) = 1 +

∑ b∈B N(ft, bi)P(cj|bi)

F + ∑

f∈F ∑

b∈B N(fs, bi)P(cj|bi) (11)

Here, P(cj|bi) = {0, 1} depending on the class la- bel of the document.

Maximization (M) step: assuming that the probabil- ities of words are independent given the class, we ob- tain the Naïve Bayesian classifier:

P(cj|di) = P(cj)

∏|bi| i=1 P(wbi,k, cj)∑

j P(cj) ∏|bi|

i=1 P(wbi,k, cj) (12)

In the Naïve Bayesian classifier, the class with the highest P(cj|bi) is assigned as the class of the docu- ment.

4. Experiments and results

Dataset: For the experiments, we used data pro- vided by Fundacion Barcelona Media [1] for the work- shop on content analysis for the Web 2.0. The given data were collected from the four different Social Net- works: Twitter, MySpace, Kongregate, and Slashdot. The size of the total dataset is 1.57 million data in- stances. Characteristics of data from these four sites vary, making for appreciably more challenging work of cyberbullying detection. For example, when compared to a posting on MySpace, a tweet is much shorter. In addition, on MySpace it can often be found that threads become off-topic and may contain more than one topic. Whereas, Slashdot content comprises com- ments on news threads, while Kongregate comprises real-time gaming chat content. Our task is to identify cyberbullying instances from any type of streaming text.

Raw data is in XML file format of differing struc- tures. A generalised data parser has been created to ex- tract information relating to time and content details. Owing to the nature of social network data, substan- tial pre-processing is conducted to increase the qual- ity of data and the performance of following steps. In the pre-processing module, we discarded the least and most frequently used words that carrying insignificant

details. In addition, we ignored, hash tag and re-tweet keywords from Twitter datasets to avoid bias, and we also removed web addresses. Further, all content was converted to lower case letters. The stop words were taken out and every word was turned into a seed word with WVTool. We employed the session scenario by sorting instances based on the time and generated streaming sessions of alternating length. We employed the TF −IDF scheme to represent data as an input to the learning algorithm by providing appropriate weight to each unigram feature. Current TF − IDF values were updated by the system when a new session ar- rived.

Evaluation: In this paper, we are not interested in the performance of the web crawler agent. Rather our focus is to classify cyberbullying instances in unla- belled streaming text. Therefore, we consider evalua- tion of the classification algorithm only. The classifi- cation of cyberbullying messages is a very critical is- sue because of the false positive and the false nega- tive data. Identifying instances of cyberbullying when they actually are not is already a sensitive enough is- sue (the false positive) while it is essential to ensure the system does not ignore or bypass any instances of cyberbullying (the false negative). As a result, the false negative and the false positive instances are both cru- cial for classifiers performance. Therefore, precision, recall and the F1 measure were considered for the per- formance evaluation of the classification task, which are defined by Eqs (13)–(15):

Precision(+) = true positive

true positive + false positive (13)

Recall(+) = true positive

true positive + false negative (14)

F1 measure(+) = 2 ∗ precision ∗ recall precision + recall

(15)

As the proposed system operates on streaming ses- sions, thus, we present the classifier performance on the average value. For n sessions, average values of precision, recall and F1 measure are defined by the Eqs (16)–(18):

Precisionavg =

∑n i=1 Precisionn

n (16)

Recallavg =

∑n i=1 Recalln

n (17)

V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system 385

F1avg =

∑n i=1 F1n n

(18)

We compare the performance of the proposed en- semble approach with the single and fixed window methods as shown in Scenarios 1, 2 and 3. In the sin- gle window, the classifier is built on the current session only, whereas in the fixed window, the classifier is built on the number of fixed window sizes s = 3 and s = 4. Scenarios 1, 2 and 3 explain the experimental results of the one-class ensemble stacking classifier.

Scenario 1: Experimental results with the one-class ensemble stacking classifier In Scenario 1, we car- ried out an experiment with an availability of only 0.5% positive cyberbullying instances for initial train- ing of the overall streaming data, while incoming sessions were unlabelled. Here, to make sure there was ample cyberbullying instances available for the streaming sessions, only two sessions were generated, each of 5,000 instances. In this scenario, we selected only two sessions as we could observed that with more sessions i.e. if s = 5, some sessions may have no cyberbullying instances, thus negative instances could accumulate in the ensemble. Consequently, here the experiment was conducted on the single window alone and on the ensemble classifier. We fed 0.5% positive instances to the system for initial training; the one- class classifier extracted more reliable negative and positive samples for the prediction of unseen instances. It still has to be said that positive instances in all the data remained too low overall and as a result, the sin- gle window did not work very well. Figure 3 shows the comparison between the single window and ensemble, where it can be observed that the proposed ensemble learner outperformed baseline single window.

Scenario 2: Experimental results with the one-class ensemble stacking classifier (filtered by swear-key- words) In Scenario 2, based on swear-keyword, we firstly filtered the contents, because key swearwords indicate that inappropriate or unpleasant posts may be present. In this scenario, only 0.25% of overall data was given as initial training. Here, it is also important to note that the presence of swear-keywords alone, is not necessarily a clear indicator that the instance is a case of cyberbullying. In this case, the ensemble clas- sifier performed better than all other methods after ex- tracting and enlarging enough training set. The per- formance of the fixed window classifier, with window sizes s = 3, and s = 4, was virtually similar. In the second session, S2, these fixed window methods out-

Fig. 3. Experimental result with initial training of 0.5% of the overall streaming data (10,000 Unlabelled).

performed the ensemble classifier. Furthermore, the ef- ficiency of the fixed window method reduced, while that of the ensemble classifier improved with the ar- rival of new sessions. Whereas, it can be observed that single window technique is not operable with a lack of training sets. From Fig. 4 we can see that with the arrival of the new sessions on the system, the perfor- mance of the fixed window classifier, with window size s = 3, diminishes, whereas the performance of the en- semble classifier performs better than the three alter- native methods. When window size s = 3, the training capacity is insufficient to classify new instances. Only at the last session, recall of the fixed window classi- fier, with size s = 4 is similar to the ensemble clas- sifier, as it has able to collect sufficient training sets. Whereas, proposed ensemble classifier approach con-

386 V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system

Fig. 4. Experimental result with initial training of 0.25% of the over- all streaming data, (20000 unlabelled instances, including 10000 containing keywords).

tinues to perform well in every session as a result of the extraction and enlargement of good training sets.

Scenario 3: Experimental result with one-class ensem- ble stacking classifier on 10 sessions As shown in Fig. 5, Scenario 3 represents only 0.25% of the initial positive training of all the unlabelled streaming data for 10 streaming sessions and with each session con- taining 157,000 unlabelled posts. Overall 1.57 million posts were processed in total. In this scenario, where 10 sessions were generated, only precision was com- pared [precision is defined as: TP/(TP + FP)]. For instance, we were interested in true positive and false positive instances classified by the system. Here we

Fig. 5. Experimental result with initial training of 0.25% of the over- all 10 streaming sessions (each session containing 1,57,000 unla- belled instances).

found that in the text streams, cyberbullying posts were very rare as most of the sessions failing to contain cy- berbullying posts, though from our manual observa- tion we discover that many instances contain swear- keywords. Some messages had only single words like ‘Damn’ or ‘F***’, ‘shit’, ‘hell’. The majority of mes- sages which contained a single swear-keyword were ignored by our system, also it was expected that these keywords were not intended as cyberbullying mes- sages. In the validated dataset, posts with common used words such as ‘Damn’ and ‘F****’, were not deemed to be of a cyberbullying nature and so were not labelled positive as such. In Scenario 3, the ensem- ble learner outperformed each other method, clearly demonstrating the capability of the ensemble learner to identify traces of cyberbullying within substantial volumes of unlabelled data. With the accumulation of positive and/or negative training samples, the improve- ment in precision in fixed window size s = 3, and s = 4 and ensemble learner was observed through- out the sessions. However, like other scenarios, the sin- gle window underperformed. Here recall was not com- pared owing to the large amount of negative data.

Scenario 4: Experimental results with learning from positive instances by extracting keywords To investi- gate the effectiveness of the method when data source are difference and hence the data distribution varies. We used initial positive training Pn and Un from MyS- pace dataset and evaluate it on two different datasets that are Kongregate and Slashdot. The purpose is to investigate effectiveness and the reusability of the en- larged training set in the data emerged from any so- cial networks. In this experiment, we consider preci- sion as an evaluation matrix, here we are interested in the percentage of true positives identified by the sys-

V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system 387

Fig. 6. Experimental result with Learning from Positive Instances by Extracting Keywords.

tem. As shown in Fig. 6, the effectiveness of the pro- posed approach is compare with the existing approach, LPLP , by varying K. Through LPLP is a robust method when Pn is fairly small [13], in case of cy- berbullying detection its performance is very low for extracting reliable training. From Fig. 6, we can ob- serve that proposed method which extends LPLP by incorporating swear-keywords outperformed existing method. Occurrence of cyberbullying is rare, in the dataset only 1.5% of the total data is labelled as cyber- bullying (positive). The performance of the classifier is boosted when Kp is considered.

5. Conclusion and future work

This paper introduces the new framework for cy- berbullying detection. A session-based one-class en- semble classifier on the streaming text to provide an alternative for unlabelled data classification is pro- posed. State-of-the-art studies on cyberbullying detec- tion were conducted on limited hand-labelled datasets,

while training was conducted using positive and nega- tive instances. We investigated the one-class ensemble learning method for the detection of cyberbullying to tackle the real world challenges, where streaming data is unlabelled. We proposed a novel method to train cy- berbullying detection system using only a small set of positive training, where the system automatically ex- tracts reliable negative and strong positive instances to aid training of the substantial amount of unlabelled data. Further investigations conducted in this research reveal that detection of cyberbullying is a complex phenomenon owing of the difference between cyber- bullying, cyber-teasing and cyber-jokes. This subtlety can produce the false positive and the false negative instances, which in turn reduce the capabilities of the classifier. As cyberbullying is something which is still left open to personal opinion and sentiment. However, initial results in this paper clearly indicate that the pro- posed approach is a viable method for learning about instances of cyberbullying both efficiently and auto- matically from unlabelled data streams in online social networks.

In the future, we will consider the evaluation of web agent crawlers based on the crawled seed pages and their relevance for the cyberbullying detection. In addition, we intent to expand our work by adding a practical user feedback system in order to facilitate the instance filtering process of apparent cyberbully- ing, which turn out to be cases of cyber-teasing or cyber-jokes. The intention for this is to subsequently increase the learning (discriminating) potential of all classifiers.

References

[1] Fundacion barcelona media (fbm) content analysis for the web 2.0, available: http://caw2.barcelonamedia.org/, retrieved on: 10 Jan 2011.

[2] D. Barbará, C. Domeniconi and N. Kang, Mining relevant text from unlabelled documents, in: Proc. of the 3rd IEEE Interna- tional Conference on Data Mining(ICDM), 2003, pp. 489–492.

[3] D.M. Blei, A.Y. Ng and M.I. Jordan, Latent dirichlet allocation, Journal of Machine Learning Research 3 (March 2003), 993– 1022.

[4] M.A. Campbell, Cyber bullying: An old problem in a new guise? Australian Journal of Guidance and Counselling 15(1) (2005), 68–76.

[5] M. Dadvar, F. de Jong, R. Ordelman and D. Trieschnigg, Im- proved cyberbullying detection using gender information, in: Proc. of the 12th Dutch-Belgian Information Retrieval Work- shop, 2012, pp. 23–25.

[6] M. Dadvar, D. Trieschnigg, R. Ordelman and F. de Jong, Im- proving cyberbullying detection with user context, in: Euro- pean Conference on Information Retrieval, 2013, pp. 693–696.

388 V. Nahar et al. / Detecting cyberbullying in social networks using multi-agent system

[7] K. Dinakar, R. Reichart and H. Lieberman, Modeling the de- tection of textual cyberbullying, in: International Conference on Weblog and Social Media – Social Mobile Web Workshop, 2011, pp. 11–17.

[8] G.P.C. Fung, J.X. Yu, H. Lu and P.S. Yu, Text classifica- tion without negative examples revisit, IEEE Transactions on Knowledge and Data Engineering 18(1) (2006), 6–20.

[9] S. Hindujaa and J.W. Patchinb, Bullying, cyberbullying, and suicide, Archives of Suicide Research 14(3) (2010), 206–221.

[10] T. Hofmann, Probabilistic latent semantic analysis, in: Proc. of Uncertainty in Artificial Intelligence, UAI’99, 1999, pp. 289– 296.

[11] R. Kaltiala-Heino, M. Rimpelä, P. Rantanen and A. Rimpelä, Bullying at school – An indicator of adolescents at risk for mental disorders, Journal of Adolescence 23(6) (2000), 661– 674.

[12] Y. Ko and J. Seo, Text classification from unlabeled documents with bootstrapping and feature projection techniques, Informa- tion Processing and Management 45(1) (2009), 70–83.

[13] X.-L. Li, B. Liu and S.-K. Ng, Learning to classify documents with only a small positive training set, in: Proc. of Machine Learning (ECML), 2007, pp. 201–213.

[14] B. Liu, X. Li, W.S. Lee and P.S. Yu, Text classification by label- ing words, in: American Association for Artificial Intelligence (AAAI), 2004, pp. 425–430.

[15] A. McCallum and K. Nigam, A comparison of event models for naïve bayes text classification, in: AAAI Workshop on Learning for Text Categorization, 1998, pp. 41–48.

[16] A. McCallum and K. Nigam, Text classification by bootstrap- ping with keywords, em and shrinkage, in: Proc. of the Work- shop in Unsupervised Learning in Natural Language Process- ing at ACL, 1999, pp. 52–58.

[17] V. Nahar, X. Li, C. Pang and Y. Zhang, Cyberbullying detection based on text-stream classification, in: The 11th Australasian Data Mining Conference (AusDM 2013), 2013, (in press).

[18] V. Nahar, X. Li and C. Pang, An effective approach for cyber- bullying detection, Journal of Communications in Information Science and Management Engineering (CISME) 3(5) (2013), 238–247.

[19] V. Nahar, S. Unankard, X. Li and C. Pang, Sentiment analy- sis for effective detection of cyber bullying, in: The 14th Asia- Pacific Web Conference (APWeb), 2012, pp. 767–774.

[20] Q. Qiu, Y. Zhang and J. Zhu, Building a text classifier by a key- word and unlabeled documents, in: Proc. of the 13th Pacific-

Asia Conference on Advances in Knowledge Discovery and Data Mining (PAKDD), 2009, pp. 564–571.

[21] P.K. Smith, J. Mahdavi, M. Carvalho, S. Fisher, S. Russell and N. Tippett, Cyberbullying: Its nature and impact in sec- ondary school pupils, Journal of Child Psychology and Psychi- atry 49(4) (2008), 376–385.

[22] W.N. Street and Y. Kim, A streaming ensemble algorithm (sea) for large-scale classification, in: Proc. of the 7th International Conference on Knowledge Discovery and Data Mining (KDD), 2001, pp. 377–382.

[23] D.M.J. Tax and R.P.W. Duin, Data domain description using support vectors, in: The European Symposium on Artificial Neural Networks, 1999, pp. 251–256.

[24] H. Wang, W. Fan, P.S. Yu and J. Han, Mining concept-drifting data streams using ensemble classifiers, in: Proc. of the Ninth ACM SIGKDD International Conference on Knowledge Dis- covery and Data Mining (KDD), 2003, pp. 226–235.

[25] J.-M. Xu, B. Burchfiel, X. Zhu and A. Bellmore, An examina- tion of regret in bullying tweets, in: The 2013 Conference of the North American Chapter of the Association for Computa- tional Linguistics: Human Language Technologies, Arpil 2013, pp. 697–702.

[26] B. Yang, Y. Zhang and X. Li, Classifying text streams by key- words using classifier ensemble, Data and Knowledge Engi- neering 70(9) (2011), 775–793.

[27] M.L. Ybarraa and K.J. Mitchell, Youth engaging in online ha- rassment: Associations with caregiver – Child relationships, in- ternet use, and personal characteristics, Journal of Adolescence 27 (2004), 319–336.

[28] D. Yin, Z. Xue, L. Hong, B.D. Davisoni, A. Kontostathis and L. Edwards, Detection of harassment on web 2.0, in: Content Analysis in the WEB 2.0 Workshop at WWW2009, Arpil 2009.

[29] H. Yu, J. Han and K.C. Chuan Chang, Pebl: Web page clas- sification without negative examples, IEEE Transactions on Knowledge and Data Engineering 16 (2004), 70–81.

[30] Y. Zhang, X. Li and M. Orlowska, One-class classification of text streams with concept drift, in: IEEE International Con- ference on Data Mining Workshops(ICDMW), 2008, pp. 116– 125.

[31] X. Zhu, X. Wu and Y. Yang, Dynamic classifier selection for effective mining from noisy data streams, in: Proc. of 4th IEEE International Conference on Data Mining (ICDM), 2004, pp. 305–312.

Copyright of Web Intelligence & Agent Systems is the property of IOS Press and its content may not be copied or emailed to multiple sites or posted to a listserv without the copyright holder's express written permission. However, users may print, download, or email articles for individual use.