An Artificial Approach to News Article Recommendation

Branko Mihaljević, Igor Čavrak and Mario Žagar Faculty of Electrical Engineering and Computing, University of Zagreb Unska 3, 10000 Zagreb. Croatia [email protected], [email protected], [email protected]

Abstract. Artificial immune systems are functions, principles and models, which are solution finding techniques often used for applied to [1]. Newly developed classification and recommendation problems. computational techniques based on immuno- Danger theory is one of new context dependant logical principles and immune engineering response theories of how an artificial immune concepts are used for solving computational system responds to pathogens. problems using metaphors from innate immune News articles recommendation systems solve systems and self/non-self discrimination. They problems of presenting articles with interesting have properties like adaptivity, diversity, robust- topics to user honoring evolving user preferences ness, distributivity, predator-prey pattern, etc. and past choices. This paper describes how Applications of AIS approach include many artificial immune system with Danger theory can different areas [2] like computational security, be utilized for news articles recommendation on anomaly detection, optimization, fault diagnosis, Web portals or similar media presenter systems robotics, machine , , and presents algorithm and method for handling etc. Many of these areas are covered with user preferences and article features in hybrids of AIS and other approaches, but some recommender system. techniques use AIS as an improvement for other algorithm imperfections. Keywords. Artificial immune system, Danger A Danger theory (DT) as an addition to AIS theory, recommender system, news article explains certain phenomena in immune processes recommendation. with the main idea that immune system responds to danger signals, not just the presence of 1. Introduction perceived non-self. This theory has been used in anomaly detection (fault detection) and Artificial immune systems (AIS) emerged in classification (data mining, Web mining) [3]. the last ten years as a new computational News articles recommendation problem is paradigm in . They belong common in personalized dynamic media to a group of biologically inspired systems like information sources e.g. Web portals. Areas of artificial neural networks, DNA computations, application could include online forums, blog evolutionary algorithms, but they have also been searches, online help searches, and site content compared to other soft computing paradigms like recommendation. The main idea behind this fuzzy systems and probabilistic reasoning. paper relies on the fact that AIS+DT technique Independently or in cooperation with other can be applied for construction of relatively approaches they have already proved their simple recommender system with properties of capabilities, but new areas of applications as well constant learning from user interactions and as improvements arise every day. adapting to changeable user preferences. Immune system in general is a complex of cells, molecules, and organs proven to be capable 2. Natural immune system of performing tasks like pattern recognition, learning, self organization, acquisition, Multilayered natural immune system is generation of diversity, noise tolerance, anomaly responsible for protection of the human body detection, generalization, distributed detection, from foreign invaders by differentiating self from and optimization. Artificial immune systems are non-self and neutralizing dangerous pathogens defined as adaptive systems, inspired by and toxins. The immune system consists of many theoretical immunology and observed immune physical, physiological, biochemical, and cellular barriers, which make the first line of defense creates population of cells that vary widely in against several types of microorganisms. This their specificity. unchanging mechanism called innate immune T cells receptors (TCR) recognize by system detects and destroys certain invading major histocompatibility complex (MHC) organisms. In addition, surface molecule bonded to particle of responds to previously unseen foreign cells. named peptide, left after digestion of an antigen Accordingly, antibody production in response to by antigen presenting cell (APC). whose specific infections is called adaptive or specific TCR recognizes MHC/peptide secretes immune response. Cells and molecules of lymphokines as mobilization signals for other immune system recognize almost unlimited cells. Activated B cells divide and differentiate variety of infectious foreign cells and substances. into plasma cells secreting antibody proteins which neutralize antigens or precipitate their 2.1. Basic elements destruction.

Lymphoid tissues and organs are responsible 2.2.1. for production and maturation of [4]. Immune cells are structurally divided into Clonal selection theory describes a basic lymphocytes and phagocytes, granulocytes, and method of an immune response to antigenic their relatives. B and T lymphocytes mediate the stimulus [5]. B cell with good adaptive immune response and are responsible binding to antigen responds to the antigen for the recognition and elimination of pathogenic stimulus by producing only one kind of agents. Main function of B lymphocytes is antibodies. When B cell receptors bind to production and secretion of antibodies, specific antigen, a second signal from TH cell stimulates proteins that recognize and bind to other proliferation (cloning) of B cells and maturing particular proteins called antigens. Antigens are these new clones into plasma cells. Plasma cells found on the surface of invading cells and the do not proliferate, but are active antibody binding of an antibody to an antigen activates secretors in contrast to proliferating B cells. elimination. Three types of T lymphocytes regu- Clonal selection or expansion theory explains late other cell actions including defensive re- that only B cells with closer match to antigen sponse. T helper (TH) cells have a role in activa- will be largely reproduced, much more than tion of B cells, other T cells, natural killer cells, clones with lower affinity. Similar process is and macrophages. Cytotoxic T killer (TK) cells done with T cells, but the main difference is that eliminate microbial invaders, cancerous cells, B cells undergo somatic mutation during and viruses. Suppressor T cells maintain and reproduction, which increases repertoire control immune response preventing autoim- diversity. B cells differentiate into long-lived mune and allergic reactions. memory cells, which do not produce antibodies, but serve in plasma cells production when 2.2. Immune processes exposed to second antigenic stimulus. Self- reactive cells are eliminated using negative Adaptive immune response incorporates selection, before inducing autoimmune response. features like sufficient diversity to deal with all Learning and memory principles of immune kinds of antigens, long lasting immunological reactions are acquired through vaccination and memory and discrimination of self from non-self. prior diseases, causing shorter lag time, higher B and T lymphocytes carry surface receptor rate of antibody production, and longer molecules capable of recognizing antigen with persistence of antibody synthesis in secondary or distinct characteristics. B cells receptors (BCR), cross-reactive response. Positive selection is a called antibodies or immunoglobulin, and process of eliminating useless lymphocytes by epitopes of an antigen to which they bind must rescuing most efficient cells from cell death, thus be complementary. Binding strength between controlling survival and differentiation of antigen and antibody is called affinity. Cross- repertoires. reactivity term describes recognition of many similar antigen epitopes by single sufficiently 2.2.2. Idiotypic network theory similar lymphocyte receptor. Before exposing B cells to antigen, combinatorial recombination Idiotypic network theory introduced by Jerne [6] suggests that interactions in the immune system do not occur just between antibodies and Two molecules can interact in multiple antigens, but that all components of the network possible alignments, and there are many different may interact with each other. Epitope is a unique similarity measures e.g. r-contiguous and shape located on antigen's surface, and paratope multiple contiguous bit rule, or affinity measure is a part of antibody responsible for recognizing of Rogers and Tanamoto. Cross-reactivity complementary epitopes. Idiotype is a set of threshold ε describes a recognition or activation shapes, called idiotopes, which serve in binding threshold that has to be crossed for positive of two antibodies. An antibody may be matched recognition of two molecules, i.e. D ≥ ε . and bonded by other antibodies through paratope-idiotope binding, similar to paratope- 3.2. Algorithms and processes epitope binding. Antibodies' bindings spread through the population with positive or negative Several general purpose immune algorithms effects on each particular antibody production. model specific processes of the immune system. This hypothesis is disputed by some Two major cell generation algorithms are bone immunologists, but it explains features like marrow model, used to generate repertoire of L- repertoire selection, self/non-self discrimination, dimensional objects with attribute string using tolerance, and memory. pseudo random number generator, and model used to generate and differentiate 3. Artificial immune system model repertoire of cells capable of performing pattern recognition, i.e. self/non-self discrimination. Artificial immune system is build upon a Thymus model uses positive selection algorithm, framework consisting of three basic elements: a where only cells with affinity greater than the component representation, a set of functions cross-reactive threshold are positively selected quantifying interactions between components, and introduced to the system (survival). It also and procedures governing system dynamics. uses negative selection algorithm to eliminate Components could be represented as B-cell, T- cells capable of binding with self. If affinity of cell, antibody, or antigen objects. Affinity an immature cell to at least one self-peptide is functions define similarity measure used for greater than the cross-reactive threshold, the cell recognition. Procedures are general purpose is eliminated from the system (death). algorithms used for immune processes analogies. Two distinct theories are presented in clonal Elements must be chosen prior to modeling selection algorithm and immune network regarding to application domain and problem. algorithm. Clonal selection algorithm CLONALG presented by de Castro and Von 3.1. Shape spaces and affinity measures Zuben [7] includes clonal selection (selection of elements with the highest affinity), clonal Generalized shape of a molecule with a set of expansion (cloning in proportion to the affinity), L parameters is presented as a feature vector in a affinity maturation (mutation inversely L-dimensional shape space S [1]. Shape spaces proportional to the affinity), and metadynamics can be divided to: integer, real-valued, Hamming (insertion of randomly generated new elements). (attribute string built out of a finite alphabet or Immune network algorithm is based on enumerations), symbolic, and other shape spaces. idiotypic network model [6] of N. K. Jerne. Later Degree of match or affinity is nonnegative real work from Varela and Coutinho [8] presented number which corresponds to distance measure second generation immune networks that functions S L × S L → ℜ+ between molecules. emphasize three characteristics: structure, Euclidean distance of antibody and antigen is dynamics, and metadynamics. Discrete models given by Equation (1). rely on differential equations and iterative procedures, and avoid the problem of finding the L 2 concrete analytical solution. De Castro and Von D = ∑(Abi − Agi ) (1) i=1 Zuben proposed aiNet (Artificial Immune Binary shape space is a type of Hamming NETwork) [9] that includes clonal selection, shape space with Hamming distance measure clonal expansion and affinity maturation, as given by Equation (2). presented in CLONALG, but it introduces term of clonal memory and also has different L ⎧1 if Ab ≠ Ag i i metadynamics (elimination of clones with low D = ∑δ i , δ i = ⎨ (2) i=1 ⎩0 otherwise affinity), clonal interactions (defining affinity between antibody clones), clonal suppression AIS algorithm parts from clonal selection and (elimination of clones with low affinity to each immune network algorithms combined with a other), network construction (insertion of clones Danger theory model, similar to one employed in into the network), network interaction (defining AISEC e-mail classification algorithm [11]. affinity between antibodies), network In recommender systems latent user suppression (elimination of antibodies with low preferences are indicated by a wide range of data affinity to each other), and diversity (insertion of including user features (user data e.g. age, randomly generated new elements). gender), user behavior with similar preferences (showing interest or rating), and features of the 4. Danger theory observed elements. News articles, as elements of interest, are characterized by a set of Central idea of Danger theory is context heterogeneous features (e.g. title, authors, date, dependant response to invading pathogens, keywords, etc.) represented as feature vectors. different from traditional self/non-self paradigm, Some of them belong to predefined vocabularies explaining self and non-self coexistence. or data structures (author's names, keywords, Immune system cells should be incapable of category), but some are real values (read score, attacking its host or self, because such cells are rating) or free text (user opinions, abstract). In eliminated during maturation, but in many cases this concept, interesting are only features that are their behavior is opposite (ignoring injections of easily evaluated, measured, compared and non-self proteins, rejection of tumors). mutated. We are concentrating on keywords and Matzinger's hypothesis [10] provides categories combined with user actions. explanation for above anomalies and states that Keywords are contained in word library and alarm signal in dying cells stimulates APC and associated to the easily mutable feature vector, triggers immune system reaction. In that way while categories are presented in a tree structure. immune response is not reaction to non-self, but A prerequisite to successful news article to stimulus or signal dispersed in small danger recommendation process is that user is area [3] around the cell. According to Matzinger, authorized and system has already learned some there are two types of signal. Signal one is interesting articles features. News articles can be binding signal of an immune cell and antigen or classified as more or less interesting based on the an antigen pattern presented by APC. Signal two matching (affinity) of their features and user represents alarm signal from TH cell for B cell preferences, and good matching can be activation or co-stimulation signal from APC for considered as "signal one". Danger "signal two" T cell activation. This theory resolves TH cell is explicitly alarmed when user reads an article activation problem by stating that alarm signal for certain time. Additionally, "signal two" can activates APC with co-stimulation signal that be also raised upon other user actions, e.g. print further activates T cell and than TH cell action, because some users prefer off-line stimulates activation of B cell. Basic rule of reading of the paper. Reading and printing Danger theory states: activate if both signals danger signals are similar according to the received; die if only signal one received; ignore representation of user interest. System learns if only signal two received. It explains only when both signals (matching and reading) problematic behavior like immunity to self, but is are present. In this way system learns good still debated in immunological society. This filtering, used when particular logged user paradigm presents signaling which leads toward accesses personalized Web portal's news page. finding a subset of features instead of final set of Presentation of articles to user is not presented in feature vectors describing non-self. this paper, but number of different techniques could be used, e.g. category sorted view with 5. News articles recommendation system descending news sequence (header and first sentence preview). User preferences change in AIS is shown to be a robust and adaptive time, so definition of self adapts accordingly. computational method which we consider When user just browses through presented suitable for predictions and recommendations in articles without really reading them (reading time the world of temporal user preferences. Danger below certain duration threshold or lack of read signal can be used as an indication of user action in certain predefined period), only "signal interest in an article, as suggested in [3]. Our one" is raised. Features of unread article are of news articles recommendation system consists of no interest to user and antibodies that matched this article should be eliminated. The main goal affinity to this clone is reduced. If the user does is to produce a set of antibodies that match not read an article in predefined period or does features which user finds interesting. not print it (lack of signal two) the same method Our algorithm works with two populations of is called with false user_action value and cells B lymphocytes: free B cells in BL set and with high affinity to that article are eliminated. memory B cells in MBL set representing long Estimated value of interest is afterwards asyn- lasting memory of good matches. Each memory chronously confirmed or disputed by user action. cell represents a set of interesting article features begin action(ag,user_action) for a particular user and each antigen represents a if (user_action) then new article as shown in comparison and mapping for each bl of BL do Table 1 of immune system analogies used for if (affinity(bl,ag) > α) then AIS+DT recommender system entities. mbl.stim ← mbl.stim + 1 C ← find_n_best(BL,ag,cFB) Table 1. Immune to AIS+DT system mapping CM ← clone_mutate(C, affinity(C,a)) Immune system AIS+DT system entity BL ← insert(BL,CM) bl1 ← find_n_best(BL,ag,1) Nonself interesting article mbl1 ← find_n_best(MBL,ag,1) Antigen extracted article features if (affinity(bl1,ag) > affinity(mbl1,ag)) then B cell in BL set set of randomly generated, bl1.stim ← cMBLSL cloned and mutated features MBL ← insert(MBL,nmbl) for each mbl of MBL do B cell in MBL set set of interesting features if (affinity(mbl,bl1) > β) then Affinity function feature resemblance mbl.stim ← mbl.stim - 1 else Every article must be processed to the antigen for each bl of BL do format for comparison with B cells. Fig. 1 if (affinity(bl,ag) > γ) then presents method new_article(), run on every new BL ← remove(BL,bl) article that arrives in the system, performing for each mbl of MBL do if (affinity(mbl,ag) > δ) then feature extraction and rating the article according MBL ← remove(MBL,mbl) to interesting features set, i.e. highest affinity of for each bl of BL do antigen and all memory cells. bl.stim ← bl.stim – 1 if (bl.stim = 0) then begin new_article(article) BL ← remove(BL,bl) ag ← process(article) BL ← insert(BL,rand(cBLNew)) article.rate ← 0 for each mbl of MBL do for each mbl of MBL do if (mbl.stim = 0) then if (affinity(mbl,ag) > ε) then MBL ← remove(MBL,mbl) if (affinity(mbl,ag) > article.rate) then end article.rate ← affinity(bl,ag) Figure 2: Core algorithm end Figure 1: Article rating Since cells have finite lifetime, they are eliminated after predefined time if they have not All articles introduced to the system are recently recognized any antigen. Cell aging is immediately rated, but are not immediately accomplished through stimulation level processed for system adaptation and learning, downcounters and all cells are set to initial because of predefined period of time in which stimulation level during generation process. In user can decide if this article is interesting. User each iteration cells with zero stimulation are action is monitored and appropriate action() eliminated, free cells stimulation level is reduced method is triggered upon it (Fig. 2). (aging), and new randomly generated cells are User feedback acts as a co-stimulation signal. introduced as free cells. If the user reads (or prints) an article, both Algorithm is tested on 2D real-valued shape signals are present and proliferation and mutation space with affinity calculation determined as of best free cells are activated. Helper method normalized Euclidean distance (range 0.0-1.0). find_n_best() is used for selecting cells with Initial set of 300 BL and 100 MBL cells was highest affinity. Cloning and mutation are done randomly generated. Stable learned set is via clone_mutate() method which returns a set of achieved after presenting approx. 100 interesting mutated clones. If the best mutated clone is articles. Values of threshold parameters α, β, γ, better than any existing memory cell, it is and δ were all set to 0.9. Best 7 BL cells (cFB) promoted to memory cell, and the stimulation were selected for cloning, and initial stimulation level of all existing memory cells with high levels were set to 25 (cMBLSL) and 15 (cBLSL). Fig. 3 presents MBL population after Principle of context dependant activation and 10000 iterations with four large clusters defined. automatic adaptation to changeable user preferences is suitable for recommendation problem and presented algorithm, showing that AIS+DT approach is applicable as a recommender system.

7. References

[1] De Castro NL, Timmis J. Artificial Immune Systems: A New Computational Intelligence Approach. Great Britain: Springer; 2002. Figure 3: Memory cell population [2] De Castro NL, Von Zuben FJ. Artificial As presented in Fig. 2, it is obvious that MBL Immune Systems: Part II - A Survey of population was stable around 100 cells and that Applications. DCA-RT 02/00. 1999. BL cell population varies from 90-550 units. [3] Aickelin U, Cayzer S. The Danger Theory and Its Applications to Artificial Immune Systems. In: Timmis J, Bentley PJ, editors. Proc. of the First International Conference on Artificial Immune Systems: 2002 Sep 9- 11; Canterbury, UK. Canterbury: University of Kent Printing Unit; 2002 p. 141-8 [4] De Castro NL, Von Zuben FJ. Artificial Immune Systems: Part I - Basic Theory and Applications. DCA-RT 01/99. 1999. Figure 4: Size of cell populations [5] Burnet FM. The Clonal Selection Theory of Acquired Immunity. Cambridge: Cambridge 6. Conclusion and future work University Press; 1959. [6] Jerne NK. Towards a Network Theory of the Recommendation problem does not include Immune System. Annals of Immunology finding a single optimum, but rather 1974; 125C: 373-89. identification of sorted subset of good choices. [7] De Castro NL, Von Zuben FJ. The Clonal Artificial immune system is good approach Selection Algorithm with Engineering through antigen-antibody interaction matching Applications. In: Whitley D, et al, editors. mechanism and antibody-antibody interaction Proc. of the Genetic and Evolutionary diversity mechanism with distributed control. Computation Conference 2000 Jul 8-12; Las Basically, this is a type of dynamic classification Vegas, USA. San Mateo, USA: Morgan system that is dependant on user's preferences Kaufmann; 2000. p. 36-7. which may change in time. In the learning phase [8] Varela FJ, Coutinho A. Second Generation system learns how to rate an article, and in the Immune Networks. Immunology Today run-time phase articles are rated and the system 1991; 12(5): 159-66 adapts and learns accordingly to the user actions. [9] De Castro NL, Von Zuben FJ. aiNet: An Future work includes many raised questions Artificial Immune Network for Data about scalability of the described system, Analysis. In: Abbass HA, et al, editors. Data because of large amount of data which must be Mining: A Heuristic Approach. Idea Group; addressed. Comparisons to other continuous 2001. p. 231-59 learning algorithms are being conducted and first [10] Matzinger P. The Danger Model in Its results compared to a variant of naïve Bayesian Historical Context. Scandinavian Journal of classifier system show similar results in Immunology 2001; 54: 4-9 prediction accuracy. Also, new types of article [11] Secker A, Freitas AA, Timmis J. AISEC: an features which require new mutation techniques Artificial Immune System for E-mail will be used. It is also possible to observe the Classification. In: Sarker R, et al, editors. user's ratings of an article or measure user profile Congress on : similarity with collaborative filtering, well suited 2003 Dec 8-12; Canberra, Australia. for an initial user profile replication. Piscataway, USA: IEEE Press; 2003. 131-9.