A Closeness- and Priority-Based Logical Study of Social Network Creation

This paper is part of an on-going programme on the study of the logical aspects of social network formation. It recalls the so-called social network model, discussing the properties of a notion of closeness between agents (in terms of the number of traits they have in common); then introduces an extended social network model in which different agents might assign different values to different traits, discussing the properties of the notion of weighted closeness that arises. These notions are used to define social network creation operations by means of a threshold strategy. The paper studies the properties of the social networks the updates create, providing sound and complete axiom systems for formal languages describing these updates’ effects.


Introduction
It is well-known that our social environment affects our behaviour and our opinions about the world. Indeed, our traits, features, preferences, beliefs and knowledge are shaped by the (actual, imagined or implied) presence of others, with communication and social influence being two crucial ways our social contacts affect us. These phenomena, discussed originally in the empirical sciences (e.g., social psychology: Fiske et al. 2010), have recently acquired further relevance, due not only to the rise of artificial intelligence, but also to that of the internet and virtual societies. Thus, social environments and related phenomena have become a topic of study of the theoretical sciences (e.g., agent-based modelling: Shoham and Leyton-Brown 2009; network theories: Estrada 2011; social network analysis: Easley and Kleinberg 2010;McCulloh et al. 2013).
The traditional approach to the formal study of 'in-group' information dynamics is to use quantitative statistical modelling, a tradition going back to French (1956), with DeGroot (1974) and Lehrer and Wagner (1981) offering some of the most significant proposals. However, in recent years there have been new proposals studying the way agents affect one another from a logical perspective. These logic-based accounts tend to use qualitative tools instead of quantitative ones. Furthermore: instead of looking at 'complex' corpora of big data describing influence behaviour, they rely on relatively 'simple' models, using formal languages to describe general 'complex' patterns about the agents' interaction.
The explicit exchange of information is one of the main driving forces of how our social environment affects us. Note that paradigmatic forms of communication have already been explored from a logical perspective (e.g., the public observations of Plaza 1989;Gerbrandy and Groeneveld 1997, the diverse forms of private ones of Baltag et al. 1998;Wang et al. 2010;Sietsma and van Eijck 2011, and the group communication of Baltag et al. 2018). Still, our opinions and information are also affected by subtler forms of interaction, such as socialisation, conformity, compliance, reactance and obedience (see, e.g., Nowak et al. 2013;Cialdini and Griskevicius 2010). These forms of social influence have recently also received attention from the logic community, with Seligman et al. (2011) one of the earliest proposals that makes use of an explicit representation of the agents' social connections. Several other proposals have followed; those include, among several others, the analysis of peer pressure (Zhen and Seligman 2011), the study of informational cascades (Baltag et al. 2013), the modelling diffusion and prediction (Baltag et al. 2016), the examination of reflective social influence ) and the inspection of priority-based peer influence (Velázquez-Quesada 2017).
All these (empirical and theoretical) studies aim to show how a social environment can shape the agents that constitute it. However, within the logic community, the processes through which these groups are created has received almost no attention till now, as few works have discussed the different mechanisms that create and change the social networks themselves. 1 This proposal is part of an ongoing research programme by the authors, aiming at studying different methods that create and change social networks (Smets and Velázquez-Quesada 2018a). The initial step of this programme is to gain a deeper understanding, within a logical framework, about the abstract mechanisms that drive the different possible processes of network creation and network change. The final goal is to understand how these processes of network creation/change interact with processes of social influence. This is important, as it is the interplay between how the social group influences the individuals and how the individuals create and reshape social groups that indicates how a group and its members will behave. So far, the main starting point in the programme's proposals is that the evolution of a social network follows a similarity-based strategy: the more similar two agents are, the more likely it is for them to end up being socially connected. 2 Notions of similarity (in particular, when used for defining notions of distance) have been valuable for different logical frameworks. On the syntactic level, they have been used for knowledge bases 3 and belief revision (Alchourrón et al. 1985;Aiguier et al. 2018). On the semantic level, they have been used for representing information change, including methods for knowledge update (Baral and Zhang 2005), semantic forms of belief revision (Katsuno and Mendelzon 1992) and others . Within the context of social network formation, the programme's previous proposals have used a simple notion of distance among agents (measuring their dissimilarity: the number of basic traits in which they differ), which is then used to define the ranking each agent has on how similar to her the other agents are. This ranking is the basis for defining the emerging social network. 4 Indeed, while Smets and Velázquez-Quesada (2017b) uses this distance to create social networks based on a 'threshold' approach (an agent becomes connected with those who are at distance θ ∈ N or closer), Smets and Velázquez-Quesada (2017a) (and its extended version, Smets and Velázquez-Quesada 2019) uses it to create social networks based on a 'group size' approach (an agent becomes connected to the λ ∈ N agents that are closer to her).
This paper explores two further ideas about how the similarities between agents are used to build a social network.
• First, instead of relying on the described notion of distance, it relies on a notion of closeness, given by the traits the agents have in common. This reflects the idea that people may focus not on what distinguishes them, but rather on what they share. From a technical perspective, looking at the agent's similarities instead of their differences also suggests other forms of using these concepts in order to decide whether two agents will become socially connected. For example, and as it will be discussed later, one can use different functions that involve the number of traits the agents have in common and the number of traits in which they differ. Each possibility enforces different properties in the resulting social network.
2 This "law of attraction" or "homophily principle" is not only conventional wisdom; it has been also backed up by laboratory data (see Byrne and Rhamey 1965;McPherson et al. 2001; Lynn and Podolny 2011, among many others). Still, some have argued not only that other factors are also involved, but also that the association between similarity and 'attraction' decreases as the amount of interaction increases, and even that what matters is not actual attraction, but rather perceived attraction (see Montoya et al. 2008 and references therein). 3 In particular, for description logics (Baader et al. 2003;Baader and Lutz 2006), several proposals for a notion of similarity over concepts and ontologies have been introduced (see, e.g., Borgida et al. 2005;d'Amato et al. 2008;Lehmann and Turhan 2012;Distel et al. 2014, among others). 4 A related problem, important in economics and computer science, is that of finding a stable pairwise matching among a collection of entities, with each entity having a preference ordering over the others (Gale and Shapley 1962). The paradigmatic examples are the stable marriage problem (entities are divided in two groups, with the elements of a pair belonging to different groups) and the stable roommates problem (arbitrary pairs). Still, in these matching problems, each entity is assumed to have a ranking of the others. In contrast, this text explores possible ways of creating such rankings, with the proposals based on the similarity idea described above.
But looking at similarities also reflect better what people and organisations tend to do. 5 A large collection of real-life scenarios in which closeness is what matters are those that require a matching between elements of two different sets. This includes, among several others, (i) donor and transplant programs, where the decision to assign an organ to a patient relies on some form of similarity between the patient and the donor (e.g., tissue type, blood type and body size), (ii) dating websites/apps, where the decision to pair up two persons relies on whether there are enough similarities between them (sexual orientation, location, preferred activities, etc.), (iii) matching between different kind of entities, as the way certain cities decide which primary school each child will attend (based on whether the child lives close to the school) and the way an institution selects the applicant to whom it will offer a position (based, e.g., on how similar the applicant and the institution research plans' are, and how close is the applicant teaching experience to the institution's needs). • Second, it refines the measurement by assuming that, for each agent, some traits might be more important than others. With this extension, one can represent and study situations with subjective distances, where two agents differing in only one trait (say, being vegetarian) might be judged as very similar by some viewer and as very different by another. Equally important, this allows the creation of asymmetric 'friendships', which are forbidden in most logical approaches to social networks, but occur regularly in both virtual societies and real life, leading to scenarios in which influence only goes in one direction. Examples of situations in which some features are more important than others include again cases as organpatient matching (tissue type, blood type and body size are important, but distance from the location where the organ is recovered might turn to be a highly decisive factor, depending on how long the given organ can survive outside a body) and as institution-applicant pairing (a research institution might put more emphasis on research similarities).
These two ideas produce a novel way of measuring similarity between two agents, whose consequences are explored. The logical setting of this work makes use of the techniques of dynamic epistemic logic (DEL; Baltag et al. 1998;van Ditmarsch et al. 2008;van Benthem 2011) to represent network-creation actions, to define languages describing their effects, and to provide axiom systems. In particular, network creation is represented by model-update operations, 6 describing how a given input model (the original network) transitions into another (the network created when similar agents become connected). Using the DEL setting, we have the advantage of working within one logical system in which both the network properties and the actions on the network can be described in a uniform way. Hence, DEL provides a unique tool to specify the logical mechanisms of network creation and network change.
Outline. The text starts by introducing the notion of closeness between agents (Sect. 2.1). This initial stage assumes that all agents' traits are equally relevant, so different traits can be thought of as having an equal 'weight'. Later in the paper this assumption is changed: social network models are extended with individual priority orderings over traits (Sect. 2.2), thus obtaining a subjectively weighted extension of the simple closeness considered first. In both cases, properties of the resulting closeness concepts are studied. The paper then proceeds to define social network update operations that use the closeness alternative in a threshold fashion (Sects. 3 and 4). In both cases, the paper studies the relational properties of the generated network, showing how different assumptions can be made to generate networks with specific properties, presenting a formal language to describe the changes the operations bring about, and providing a sound and complete axiom system for it. The concluding notes (Sect. 5) give an overview of the results obtained, highlighting also several directions for future work.

Social network models
Let A denote a finite non-empty set of agents. Let T be a finite set of traits (i.e., a collection of basic properties an agent might or might not have, called features in previous proposals). Thus, a SNM is nothing but a relational 'Kripke' model in which each element of the domain is interpreted as an agent, edges in the binary relation represent social connections (note: such relation does not need to satisfy any requirement), and the atomic valuation indicates the traits each agent has. In fact, a SNM is not only (i) a multi-trait generalisation of the basic setting of Baltag et al. (2016), which focusses on a single trait (called 'behaviour' in that paper), and thus defines V as a subset of A (i.e., a function from A to ℘ ({1})), but also, (ii) a special case of the more complex multi-trait and multi-value network models of Christoff and Hansen (2015).
A formal language. Following Baltag et al. (2016), a SNM can be described by a propositional language L, with special atoms describing the agents' traits and their social relationship.
Definition 2 (Language L) Formulas ϕ, ψ of the language L are given by ϕ, ψ::=t a | S ab | ¬ϕ | ϕ ∧ ψ with t ∈ T and a, b ∈ A. Formulas of the form t a are read as "agent a has trait t", and those of the form S ab as "agent a considers agent b as a social connection" (or, alternatively, as "b is part a's social network"). Boolean constants ( , ⊥) and other Boolean operators (∨, →, ↔, , the latter representing the exclusive disjunction) are defined as usual. Given a SNM M = A, S, V , formulas in L are semantically interpreted in the following way: A formula ϕ ∈ L is valid (notation: ϕ) when M ϕ holds for all M.
Since there are no restrictions on the social relation nor on the trait function, any axiom system of classical propositional logic is fit to characterize syntactically the validities of L over the class of social network models.
Differences and distance. Different criteria can be used to decide whether two agents will be socially related. This paper follows a similarity approach, under which the more similar two agents are, the more likely it is for them to end up in being socially connected. A natural formalisation of this idea, used in Smets and Velázquez-Quesada (2017a, b), relies on a notion of distance between agents, given by the number of traits in which they differ. 7 Definition 3 (Differences and distance) Let M = A, S, V be a SNM. The set of traits distinguishing agents a, b ∈ A in M (that is, their differences: the traits one of them has but the other does not) is given by Then, the function dist M : A × A → N, indicating the distance in M between any pair of agents, is given by As observed in Smets and Velázquez-Quesada (2017b), dist satisfies the following properties.
Proposition 1 Let M = A, S, V be a SNM; take any a, b, c ∈ A. Then, • Non-negativity (the distance from a to b is non-negative): In fact, in this |T|-dimensional setting in which agents can be distinguished only by elements of T, • Symmetry (the distance from a to b is equal to that from b to a): • Reflexivity (the distance from any agent to herself is 0): dist M (a, a) = 0.
• Subadditivity (the distance between two agents is smaller or equal than the sum of their distances with respect to a third one): Then, dist is not only a mathematical distance (non-negativity, symmetry and reflexivity) but also a semi-metric (it also satisfies subadditivity). Still, it is not a metric as it does not satisfy identity of indiscernibles: dist M (a, b) = 0 does not imply a = b, as two different agents may have exactly the same traits. 8 Note also how other reasonable definitions of a notion of distance might not satisfy these properties. For example, one could think of defining a distance dist' between a and b as the number of traits distinguishing them minus the number of traits they have in common. This alternative definition satisfies symmetry, but fails at non-negativity, reflexivity and subadditivity. 9 Similarities and closeness. Still, there are other alternatives for the similarity approach. A natural one is to relate two agents not when their differences are small enough, but rather when their similarities are large enough.
Definition 4 (Closeness) Let M = A, S, V be a SNM. The set of common traits between agents a, b ∈ A in M (that is, their similar traits: those both or neither have) is given by with R the standard set complement of any R ⊆ T (with respect to T). Then, the function clos M : A × A → N, indicating how close are, in M, any two agents, is given by 8 Note how the metric requirements are actually very weak: they are satisfied, for example, by taking otherwise, a definition that does not take into account the 'dimensional structure' of the agents (Tversky 1977). See Deza and Deza (2009, Chapter 1) for more on mathematical distances, and Beals et al. (1968); Tversky and Krantz (1970); Krantz and Tversky (1975) for a critical discussion on these requirements. 9 That symmetry holds is straightforward. For the failure of non-negativity and reflexivity, dist'(a, a) = −|T| for any agent a, as the agent has no differences with herself and coincides in all elements of T. For the failure of subadditivity, consider T = {t 1 , t 2 } and agents a, b, c such that This concept of closeness is definable in terms of the distance of before. 10 However, looking at the situation from a similarity perspective suggests interesting alternatives (e.g., Definition 5). The just defined notion satisfies some properties deemed intuitive for a notion of similarity.
• Non-negativity (the closeness from a to b is non-negative): In fact, in this |T|-dimensional setting in which the agents' potential similarities are those in T, • Symmetry (the closeness from a to b is equal to that from b to a): • Self-exhaustiveness (the closeness from any agent to herself is |T|): • 'Supersubstractivity' (the distance between two agents is larger or equal than the difference of their similarities with respect to a third one):

Example 1 Consider a set of traits
The following table shows the differences and similarities between some pairs of agents: Then, the following diagrams show the agents together with the derived distances and closeness: Previous proposals have explored the definition of social networks using the notion of distance; this paper will rely rather on the notion of closeness.
It is worthwhile to note how looking at the situation from a similarity perspective suggests alternative definitions of closeness. While some of them might not satisfy all the listed properties, this 'failure' might still be reasonable for the concept of similarity. For example, Tversky (1977) argues that similarity statements of the form "a is like b" are directional, with a subject a and a referent b, and thus are not in general equivalent to symmetric statements "b is like a": saying "an eclipse is like a circle" is not the same as saying "a circle is like an eclipse". Thus, other definitions of closeness might still be sensible, as the one below in which the closeness between two agents is given by the number of traits they have in common minus the number of traits distinguishing them.

Definition 5 (Closeness bis)
The alternative function clos-bis M : A × A → N, indicating how close are, in M, any two agents, is given by This alternative definition of closeness is a variation of the proposal in Tversky (1977), which rather defines a notion of similarity in terms of simi M (a, b) and, separately, V (a) \ V (b) and V (b)\V (a) (the last two comprised in diff M (a, b) in this paper's case). 11 It is not hard to see that it satisfies the following properties.
• Symmetry (the closeness from a to b is equal to that from b to a): • Self-exhaustiveness (the closeness from any agent to herself is |T|): clos-bis M (a, a) = |T|.
• Monotonicity (closeness increases with addition of common traits and/or deletion of distinguishing traits): The defined notions of distance and closeness rely on an important assumption: all traits are equally relevant for all agents, so a difference/similarity in a given trait has the same weight as a difference/similarity in any other. However, depending on the case we look at, we can as well think of scenarios in which some traits or features are more important than others. Maybe more crucial, this 'degree of importance' might differ from agent to agent.

Extended Social Network Models
This subsection introduces a new structure, an extended social network model, which asks for each agent to have a priority ordering over traits. These orderings reflect not only the different importance that different traits might have, but also the fact that different agents might give precedence to different traits. 12 is a total preorder (agent a's priority ordering over traits), with t 1 a t 2 indicating that, for a, trait t 1 is at most as important as trait t 2 .
Thus, a XSNM is a SNM plus an additional model component. Hence, any SNMnotion (in particular, the sets diff and simi, Definitions 3 and 4) can be equally defined for an XSNM. Note how, for every agent a, every two traits are comparable (by a 's totality), some of them might be equally important ( a does not need to be antisymmetric) and there are maximum ones (by T's finiteness).
A formal language. In order to describe the additional semantic component of XSNMs, the language L is extended with a(nother) special atomic proposition that will be used to describe the agents' trait-priority ordering (cf. Holliday 2009; Ghosh and Velázquez-Quesada 2015; Velázquez-Quesada 2017).

Definition 7 (Language L )
The language L extends L (Definition 2) with atomic propositions of the form t 1 a t 2 (with t 1 , t 2 ∈ T and a ∈ A), read as "for agent a, trait t 1 is at most as important as trait t 2 ". Given an XSNM M = A, S, { a } a∈A , V , these new atoms are semantically interpreted with respect to the given agent's trait-priority ordering: As before, a formula ϕ ∈ L is valid ( ϕ) when M ϕ holds for all M.
For an axiomatisation, any propositional system is fit as long as it includes the following axioms, characterising the properties of the trait-priority ordering (totality, reflexivity and transitivity). For all a ∈ A and all t 1 , t 2 , t 3 ∈ T, Subjective closeness. With the extra information provided by each agent's trait priority ordering, it is possible to look not at the 'objective' notions of closeness of before (which consider all traits being equally important for all agents), but rather at a 'subjective' notion of closeness that depends not only on the set of traits the agents have in common, but also on how important these similarities (and differences) are for the agent who is making the judgement. 13 More precisely, the notion of closeness that will be used here is given by the weighted sum of the agents' common traits, with this weight defined in terms of the given agent's trait priority ordering.
In order to make this definition precise, note first how each priority ordering on traits a induces an ordered sequence of subsets of T, each one containing traits that are, from a's perspective, equally important.
By defining the notion of a -maximum in the standard way (for every R ⊆ T, take max a (R):= t ∈ R | t a t for all t ∈ R ), each a induces the following layers on (i.e., ordered sequence of subsets of) T (for k ≥ 0): Thus, while T a 0 contains the traits that are, from a's perspective, the most important, T a 1 contains her second most important traits, and so on. In fact, the layers define a quasi-partition: some of them might be empty, but nevertheless they are pairwise disjoint and collectively exhaustive. Moreover, since T is finite, there will be a first empty layer (say, T a a ), and from that moment on all layers will be empty. In symbols, there is a a > 0 (as T = ∅) such that T a k = ∅ for 0 ≤ k < a , and T a k = ∅ for k ≥ a . As sketched above, this proposal's strategy is to assign a weight to each trait, and then define the closeness between two agents as the weighted sum of the traits they have in common. There are two natural requirements for such an assignment wei. First, traits in the same layer should receive the same weight (so equally important traits have the same similarity effect); second, the layers' order should be respected (so a similarity in a more important trait is more significant than a similarity in a less important one). More precisely, . Here, wei a will be defined as a function from a layer's number to a natural number. In order to simplify its definition, it will be assumed that the 'gap in importance' between traits in adjacent layers is simply 1.

Definition 9
Let M = A, S, { a } a∈A , V be an XSNM. Take a ∈ A, and let a be the index of the first empty layer generated by a (i.e., T a k = ∅ for 0 ≤ k < a , and T a k = ∅ for k ≥ a ). The function wei a : {0, . . . , a − 1} → N is defined as Here are some relevant points about this function.
• It is straightforward to see that it satisfies the two natural requirements described above, the first because the function is from layers to N, and the second because the higher the layer T a k , the smaller its index k, and thus the larger the weight of its elements, a − k.
• With this definition, while the weight of the most important traits from a's perspective (those in T a 0 ) is a , the weight of the least important ones (those in T a a −1 ) is 1, so they still count. • The weight received by traits in T a 0 emphasises the relativeness. On the one hand, if all traits are equally important for a (i.e., if T a 0 = T), then they all receive a weight of 1 (wei a (0) = 1). On the other hand, if some traits are strictly more important than others (i.e., if T a 0 ⊂ T), then the most important ones will have a greater weight (wei a (0) > 1). 14 Of course, there are other alternatives for wei. For example, one can assign a weight of 0 to the least important traits, then move up increasing the weight of each layer by some g ∈ N until the most important traits are reached. One can also use more general assignments, with gaps of different size between different layers. One could even use a more 'personal' function, with these gaps between layers differing from agent to agent. For simplicity, here the same weight assignment will be used for all agents. Still, being a function from layers to natural numbers, with the layers potentially different from agent to agent, this yields a subjective weighted measure of any subset of T.
Definition 10 (Weighted measure) Let M = A, S, { a } a∈A , V be an XSNM; take a ∈ A and R ⊆ T. The a-weighted measure of R is given by with T a 0 , . . . , T a a −1 the layers induced on T by agent a's priority ordering a , and wei a the weight function defined above (Definition 9).
Finally, with these tools in place, here is the definition of the closeness between two agents, from a given agent's point of view.
Definition 11 (Weighted closeness) Let M = A, S, { a } a∈A , V be an XSNM; take a ∈ A. The function w-clos a M : A × A → N, indicating the a-weighted closeness in M between any pair of agents (that is, the weighted distance from agent a's point of view) is given by 15 w-clos a M (b 1 , b 2 ):=w-meas a M (simi M (b 1 , b 2 )).
In words, the distance between b 1 and b 2 according to a is given by the weighted sum of the traits they have in common, with the weight given by the importance of the traits from a's point of view. 16 Note how, by understanding a SNM as an XSNM in which all agents consider all traits equally relevant (i.e., a SNM is an XSNM in which a = T × T for all a ∈ A), the just defined function clos M over XSNM is a generalisation of the function w-clos a M over SNMs (Definition 4). Indeed, as indicated before, when agent a considers all traits as equally important, there is a unique layer T a 0 = T; thus, wei a (0) = 1, and hence w-meas a Each weighted closeness is simply a subjectively weighted extension of the notion of closeness (Definition 4); thus, it satisfies the indicated properties.
• Non-negativity (the a-weighted closeness from b 1 to b 2 is non-negative):

Moreover: its upper bound is the a-weight of all traits in T,
• Symmetry (the a-weighted closeness from b 1 to b 2 is equal to that from b 2 to b 1 ): • Self-exhaustiveness (the a-weighted closeness from any agent to herself is the a-weight of all traits in T): • 'Supersubstractivity' (the a-weighted distance between two agents is larger or equal than the difference of their a-weighted closeness with respect to a third one): 15 An analogous function w-dist can be defined as w-dist a M (b 1 , b 2 ):=w-meas a M (diff M (b 1 , b 2 )). 16 Thus, each agent's priority ordering is combined with the weight assignment to obtain a function w-meas that assigns a 'similarity value' to each set of traits. Alternatively, one can assume that each agent can assign directly a 'similarity value' to each set of traits. This text has opted for the first option as, even though the process to reach w-meas is long, it might be easier for a real agent to rank the traits under discussion than to assign a number to every subset of them.
. Example 2 Let T = { p, q, r } be the set of traits, and recall the agents of Example 1 as well as their differences and similarities: In a SNM model, these sets are enough to determine the agents' distances and closeness. In a XSNM, more information is needed: the trait priority ordering of the agent whose point of view will be consider. Then, differences in priorities over traits might lead to different distances and closeness.
• Assume the priority ordering of an agent (any of them; her name is omitted for notational simplicity) induces the ordering {r } {q} { p} (i.e., r is strictly more important than q, which is strictly more important than p). With a slight abuse of notation, the induced function wei is such that Then, the weighted distance and closeness are the following.
• Assume now that the priority ordering of the agent induces the ordering { p, q, r } (i.e., the three traits have the same priority). Being this the case in which all traits are equally important, the induced wei is such that wei({ p, q, r }) = 1.
Then, the weighted distances and closeness reduce to the distances and closeness shown in Example 1. Then, the weighted distances and closeness are the following.

Closeness-Based Threshold Update
Following the DEL approach, it is now possible to provide a model operation creating the new social network model. There are several options. One of the most natural possibilities is the threshold approach of Smets and Velázquez-Quesada (2017b), establishing a link from agent a to agent b if and only if their distance is smaller than the given threshold θ ∈ N. Another alternative, suggested by the cognitive science literature, is to use a group-size limit, relating a with b if and only if b is within the λ ∈ N agents closest to a (Smets and Velázquez-Quesada 2017a). Of course, there might be other possibilities.
Here, the threshold strategy will be used over the agents' closeness. 17 In order to study the differences between the use of closeness and distance, this section will work with SNMs and the language L, leaving the study of weighted-closeness-based threshold dynamics over XSNM for Sect. 3.
Definition 12 (Closeness-based threshold update) Let M = A, S, V be a SNM; take θ ∈ N. The closeness-based threshold (CT ) update yields the SNM M θ = A, S θ , V , which differs from M only in its social relation, given by Definition 2.3 in Smets and Velázquez-Quesada (2017b) states that b will be in a's social network if and only if the distance between them is smaller or equal than the threshold. Here, focussing rather on similarities, b will be in a's social network if and only if the closeness between them is larger or equal than the threshold. 18 Example 3 Consider a set of traits T = { p, q, r } together with a set of agents A = {a, b, c, d} as in Example 1: 17 The already referred Smets and Velázquez-Quesada (2017b) uses also the threshold strategy, but over the agents' distance. 18 In the finite case, this closeness-based threshold update with a threshold θ is equivalent to a distancebased threshold update (Smets and Velázquez-Quesada 2017b) with a threshold |T| − θ .
The diagram below on the left shows the agents and their derived closeness: The diagram above on the right shows the result of a CT update with θ = 2, with edges indicating the resulting social relation.

Properties of the Resulting Network
It is time to explore the properties of the resulting social network. First, three straightforward observations.

Proposition 5 Let M = A, S, V be a SNM. Then, the social relation S θ is • reflexive if and only if θ ≤ |T|, • serial if and only if it is reflexive,
• symmetric.
Proof • The relation S θ is reflexive iff clos M (a, a) ≥ θ holds for all a ∈ A. But clos(a, a) = |T| for any a (Proposition 2), so S θ is reflexive iff |T| ≥ θ . • The right-to-left direction is obvious. From left to right, note that no agent is closer to her than herself (i.e., clos M (a, a) ≥ clos M (a, b) for any a, b ∈ A). Thus, pick any a ∈ A: if there is b ∈ A such that S θ ab, then clos M (a, b) ≥ θ so clos M (a, a) ≥ θ and hence S θ aa. • Follows immediately from the symmetry of clos M (a, b) (Proposition 2).
As shown by Example 3, the network resulting from a CT update needs to be neither transitive (S 2 ad and S 2 dc hold, yet S 2 ac fails) nor Euclidean (S 2 ab and S 2 ad hold, yet S 2 bd fails). Note that, when the network has any of such properties (in the presence of symmetry that Proposition 5 guarantees, a relation is transitive if and only if it is Euclidean), the update will then yield an equivalence social relation (modulo an appropriate threshold for getting reflexivity, as Proposition 5 indicates).
There are straightforward sufficient conditions that guarantee a transitive/Euclidean social network. Here are, for example, two simple ones.

Proposition 6 Let M = A, S, V be a SNM. The social relation S θ is transitive/Euclidean if θ = 0, and also if θ ≥ |T|.
Proof Recall (Proposition 2) that |T| ≥ clos M (a, b) ≥ 0 for any a, b ∈ A. Thus, while θ = 0 implies S θ is the full Cartesian product, θ > |T| implies S θ is empty. For the remaining case, take θ = |T|. In such case, S θ ab implies clos M (a, b) ≥ |T| and thus clos M (a, b) = |simi M (a, b)| = |T|; hence, the agents coincide in everything, that is, simi M (a, b) = T. Thus, S θ ab and S θ bc imply simi M (a, b) = T = simi M (b, c), and hence simi M (a, c) = T. Therefore, clos M (a, c) ≥ |T| and thus S θ ac.
Note how the cases with either θ = 0 or else θ > |T| are 'simple': in the first, S θ has every possible pair, in the second, it has none. The case θ = |T| is more interesting: the relation is additionally reflexive and transitive, and then the operation turns A into a cluster graph (i.e., a disjoint union of fully connected graphs). Such configurations can be also achieved not only by considering a specific threshold, but also by considering a set of agents with particular 'diversity' properties.
Example 4 • Consider T = { p, q, r } and a SNM with agents whose similarities are 'uniformly distributed', that is, a SNM in which there is n ∈ {0, . . . , 3} such that a ∈ A implies |V (a)| = n. In such cases, a CT update returns a cluster graph, regardless of the chosen threshold θ . Indeed, taking n = 0 or n = 3 makes all agents identical, so any threshold yields a fully connected graph (all agents are connected with one another). Taking n = 1 or n = 2 does generate different for each a ∈ A); in such cases, θ ∈ {0, 1} yields again a fully connected graph, and θ ∈ {2, 3} creates isolated clusters (i.e., fully connected sets) of identical agents. • Consider T = { p, q, r , s}, and again a SNM with agents whose similarities are 'uniformly distributed' (a ∈ A implies |V (a)| = n), but now restricted to n ∈ {0, . . . , 4}\{2}. Again, n = 0 or n = 4 makes all agents identical, so any threshold yields a complete graph. Taking n = 1 or n = 3 generates again different agents { p, q, s} , { p, r , s} , {q, r , s}}, respectively, for each a ∈ A), but in both situations they are all arranged as before: θ ∈ {0, 1} produces a complete graph, and θ ∈ {3, 4} creates isolated clusters of identical agents.
In fact, for any T and any SNM with agents whose similarities are 'uniformly distributed' in the mentioned restricted way, a CT update arranges the agents in disjoint fully connected groups.
Proposition 7 Take n ∈ {0, 1, |T| − 1, |T|}, and let M = A, S, V be a SNM in which a ∈ A implies |V (a)| = n. Then, a CT update returns a cluster graph, regardless of the chosen threshold.
Proof Take any two agents a, b ∈ A. In the cases with n = 0 and n = |T|, the restriction on their traits makes them identical (so clos M (a, b) = |T|). In the cases with n = 1 and n = |T| − 1, the agents are either identical again (so clos M (a, b) = |T|) or else they differ in exactly 2 traits (if V (a) = V (b) under the given restrictions, to get a different set of the same cardinality, a trait has to be removed and another has to be added, then losing two closeness points; thus, clos M (a, b) = |T| − 2). Hence, in both scenarios, the condition on A guarantees that the closeness clos M (a, b) between any two a, b ∈ A is either |T| or else |T| − 2. Now, suppose clos M (a, b) ≥ θ and M (b, c), then clos M (a, c) = |T| (see proof of Proposition 6) so clos M (a, c) ≥ θ . Otherwise, at least one of clos M (a, b) and clos M (b, c) is |T| − 2; but then, the one with such value was still larger or equal than θ , and thus so is clos M (a, c) (her lowest possible value is also |T| − 2).
Of course, this is not a necessary condition for obtaining cluster graphs: a restriction of Example 3 to either {a, b} or else {c, d} produces a cluster graph when θ = 2. A further investigation on the necessary and sufficient conditions for obtaining transitive/Euclidean relations is left for further work.
It is useful to note what happens in the 'agents with similar dissimilarities' cases not covered by Proposition 7 (that is, the cases for n / ∈ {0, 1, |T| − 1, |T|}).
Example 5 Consider T = { p, q, r , s}, and again a SNM with agents whose similarities are 'uniformly distributed' (a ∈ A implies |V (a)| = n), this time for , but there will be no cluster of size 4, as any group of such length has to include the 'mirror-image' of at least one of its members. The diagram below (reflexive edges omitted, and symmetry assumed) shows the resulting configuration.
The cases described in Examples 3 and 5 reveal the 'typical' shape of the networks produced by the operation. Agents that are similar enough (i.e., θ -similar) will be arranged in fully connected components (the clusters); then, within each component, some agents will be bridges (edges whose deletion would increase the number of connected components in the graph), establishing social connections between somehow 'dissimilar' groups.

A Formal Language
In order to talk about the transformations the CT update operation brings about (and the properties of the social relation it creates), the basic language L is extended with a new modality.
Definition 13 (Language L θ ) The language L θ extends L with a modality [ θ ] to build formulas of the form [ θ ] ϕ ("after a CT update, ϕ is the case"). The semantic interpretation of this modality refers to the CT operation of Definition 12 as follows. Let M be an SNM; then, Note how, given both the lack of precondition for the semantic interpretation, and the functionality of the model operation, the dual modality θ ϕ: The axiom system characterising validities of L θ in SNM is built via the DEL technique of recursion axioms: valid formulas and validity-preserving rules indicating how to translate a formula with occurrences of the model-changing modality (in this case, [ θ ]) into a provably equivalent one without them (in this case, a formula in L). Then, while soundness follows from the validity and validity-preserving properties of the new axioms and rules, completeness follows from the completeness of the axiom system for the basic language. The reader is referred to (van Ditmarsch et al. 2008, Chapter 7) and Wang and Cao (2013) for a detailed explanation of this technique.
In order to use this strategy, one requires a basic 'static' language that is already expressive enough to characterise the changes the model operation brings about; as it will be shown, L is up to the task. The axioms for atoms describing the agents' traits, negations and conjunctions are the standard for a 'preconditionless' model operation (in the case of trait atoms, due to the fact that agents' traits are not affected by the operation). The crucial axiom, characterising the new social network relation, will be built up step by step.
Intuitively, the axiom should have the form [ θ ] S ab ↔ 'clos M (a, b) ≥ θ , and the work consists on expressing the 'clos M (a, b) ≥ θ -part with a formula of the language. Towards this, the finiteness of the set of traits T plays a big role, as it allows us to write existential and universal quantifications over sets of traits in terms of disjunctions and conjunctions, respectively.
First, it is clear that the L-formula simi a·b (R) defined below (a, b ∈ A; R ⊆ T) is true in a SNM M if and only if R is exactly the set of traits a and b have in common in such model (i.e., M simi a·b (R) if and only if R = simi M (a, b)). Table 1 Axiom system for L θ over SNM (a, b ∈ A) ϕ for ϕ an instance of a propositional tautology From ϕ → ψ and ϕ infer ψ with ϕ [ψ 2 /ψ 1 ] any formula obtained by replacing one or more occurrences of ψ 1 in ϕ with ψ 2 .
Then, the formula clos τ a·b below (a, b ∈ A, τ ∈ N) characterises the fact that the closeness between agents a and b is τ (i.e., M clos τ a·b if and only if clos M (a, b) = τ ). 19 Thus, the formula below characterises the fact that the closeness between a and b is not between 0 and θ − 1.
Given the lower bound of clos a (the non-negativity property in Proposition 4), the formula characterises the fact that the closeness between a and b is larger than or equal to the threshold. Table 1 form a sound and strongly complete axiom system characterizing validities of L θ on SNMs (for a finite T).

Theorem 1 The axioms and rules in
Proof Soundness follows from the validity of the axioms. Completeness follows from the completeness of the basic system (first half of the table), as the recursion axioms (second half) define a validity-preserving translation from L θ to L. 20

Weighted Closeness-Based Threshold Update
This section explores a threshold update based now on the agents' weighted closeness.
Definition 14 (Weighted closeness-based threshold update) Let M = A, S, { a } a∈A , V be a XSNM; take θ ∈ N. The weighted closeness-based threshold (WCT ) update 19 The formula states that there is at least one set of traits R, of size τ , such that R is exactly the set of traits a and b have in common. There can be a most one such set, therefore the formula is true exactly when a and b have exactly τ common traits. 20 The rule of substitution of logically equivalents takes care of formulas with more than one occurrence of [ θ ]: first, work with the deepest occurrence of such modality and, once it is eliminated, proceed with the following one.
yields the XSNM M θ = A, S θ , { a } a∈A , V , which differs from M only in its social relation, given by Note the difference between the former CT update (Definition 12) and the just provided WCT update. As before, b will be in a's social network if and only if the closeness between them is larger or equal than the threshold. But now, their closeness is measured not as the objective number of traits they have in common (clos; Definition 4), but rather by the weighted-closeness as seen from the point of view of agent a (w-clos; Definition 11), which relies on a's priority ordering on traits.
Then, the agents' similarities are given by Now, assume the agents' trait priority ordering are as follow.
Then, here are the agents' closeness, from the point of view of each one of them.
The diagrams below show two XSNMs the WCT operation creates, the leftmost with a threshold θ = 3, and the rightmost with a threshold θ = 4. In both cases, the edges indicate the resulting social relation.

Properties of the Resulting Network
Example 6 shows how, different from the 'weightless' case (Proposition 5), the network resulting from a WCT update does not need to be reflexive. This occurs because of agent b's trait priority ordering, which induces a wei function that assigns 1 to every trait, thus giving b's weighted closeness function a range of {0, . . . , 3} (Proposition 4: , too low for a threshold similarity requirement of θ = 4. Of course, the new social relation will be reflexive when the threshold does not go beyond the maximum range of all agents. Once explained, the reason why reflexivity fails in the general case is clear. Still, the situation is interesting because it shows a difference between the so far analogous distance and closeness approaches. Indeed, a 'weightless' distance-based threshold operation (Smets and Velázquez-Quesada 2017b) produces reflexive social networks, as not only θ ≥ 0 but also dist(a, a) = 0 for any agent a ∈ A (Proposition 1); so does a 'weightless' closeness-based threshold operation, provided that θ ≤ |T| (Proposition 5). In a 'weighted world', a distance-based threshold update also produces reflexive social relations, as again 0 ≤ w-dist a M (b 1 , b 2 ) holds for any a, b 1 , b 2 ∈ A. Still, in the weighted closeness-based version, the upper bound of w-clos differs from agent to agent (Proposition 4), so an extra condition is needed (Proposition 8) to obtain reflexivity in the weighted closeness-based case.
Note how Proposition 8 also characterises the cases in which a WCT update generates serial social networks. But this is the case if and only if there is a ∈ A such that w-clos a M (a, a) < θ (i.e., if the relation is not reflexive): the leftto-right is the straightforward, and the right-to-left comes from the fact that no agent is more similar to a than a herself. Thus, the resulting network is serial if and only if it is reflexive, that is (Proposition 8), if and only if θ ≤ w-meas a M (T) for all agents a ∈ A.
Characterisation results (i.e., necessary and sufficient conditions) for other relational properties, as symmetry, transitivity and Euclideanity are not as straightforward as the reflexivity and seriality cases. Still, some sufficient conditions can be found. For example, it has been show that social relations built within SNM by means of the CT update are symmetric (Proposition 5). 21 Then, one can derive the following relatively straightforward and yet revealing result for CT updates over XSNM.
Proposition 10 Let M = A, S, { a } a∈A , V be a XSNM in which all agents consider all traits equally relevant (i.e., t a t for all t, t ∈ T and a ∈ A). Then, S θ is symmetric for any threshold θ ∈ N.
importance of the remaining traits, and still their social connection will be bidirectional (or non-existent, if θ does not allow it).
For transitive and/or Euclidean, Sect. 3.1 showed how sufficient and necessary conditions require attention to more details, even in the 'weightless' case. One can only expect for these details to become more intricate when (potentially different) priorities over traits are brought into the picture. A further study on necessary and sufficient conditions for these properties in this 'weighted' scenario is left for further work.

A Formal Language
In order to talk about the changes the WCT update operation brings about (and the properties of the social relation it creates), the basic language L is extended with a new modality.
Definition 15 (Language L , θ W ) The language L , θ W extends L with a modality [ θ W ] to build formulas of the form [ θ W ] ϕ ("after a WCT update, ϕ is the case"). The semantic interpretation of this modality refers to the WCT operation of Definition 14 as follows. Let M be an XSNM; then, Again, the axiom system characterising validities of L , θ W in XSNM is built via the DEL's recursion axioms technique. Once again, this strategy requires an expressive enough basic language; thanks, in particular, to atoms of the form t 1 a t 2 , the language L is up to the task. The axioms for non-social-network atoms (including now not only those describing the agents' traits, but also those describing their priority ordering over them), negation and conjunction are standard once again (for the new atoms, the priority orderings are not affected by the operation). The crucial axiom, the one characterising the new social network relation, will be once again built up step by step.
The axiom should have the form [ θ ] S ab ↔ 'w-clos a M (a, b) ≥ θ . Once again, the finiteness of T is crucial for disguising quantifications over sets of traits. The other crucial aspect are the special atoms of the language (those of the form t a and t 1 a t 2 ), which allow to describe the properties the involved sets should have. The formula simi a·b (R) of before (Page 19) will play again an important role, but now it will be also important to describe the layers induced by each agent's priority relation, as they are crucial in the weight each element of simi(a, b) will have.
First, the L -formulas InLayer a k (t) defined below (for a ∈ A, 0 ≤ k < a and t ∈ T) characterise the membership to each one of the layers induced by agent a's priority relation on traits (i.e., M InLayer a k (t) if and only if t ∈ T a k ).
Indeed, a trait t is in layer T a 0 (i.e., it is one of the most important traits for agent a) whenever every trait u is at most as important as t (the definition of InLayer a 0 (t)). Moreover, t is in layer T a k+1 whenever it does not belong to an 'upper' layer (first conjunct of InLayer a k+1 (t)) and, within these traits not belonging to 'upper' layers, it is among the most important ones (second conjunct of InLayer a k+1 (t)). Thus, each L -formula Layer a k (R) defined below (a ∈ A, 0 ≤ k < a , R ⊆ T) is true in M if and only if R is the ith layer generated by a (i.e., M Layer a k (R) if and only if R = T a k ).
The previously defined simi a·b (R) (characterising the set of traits a and b have in common) and the just defined Layer a k (R) (characterising the layers generated by a's priority relation) characterise the sets that are involved in defining the weighted closeness between two given agents (Definition 11). It is only left to take once again advantage of the finiteness of T (and thus of the number of its subsets) to provide formulas stating both their existence and that they indeed make the agents' weighted closeness larger or equal than the threshold. First, for a, b ∈ A and τ ∈ N, The formula states that there is at least one way of picking sets R, T 0 , . . . , T a −1 ⊆ T for which a −1 k=0 (|R ∩ T k | · wei a (k)) = τ holds, such that (i) T i = T a i for each 0 ≤ i < a , and (ii) R = simi M (a, b). Of course, if w-clos a M (a, b) = τ , then there is exactly one way of picking these sets such that (i) and (ii) are satisfied (otherwise, no such sets can be picked); hence, the formula holds exactly when w-clos a M (a, b) = τ (i.e., M w-clos τ a·b if and only if w-clos a M (a, b) = τ ). Finally, the formula below characterises the fact that the weighted closeness between a and b is larger or equal than the threshold θ .  Table 2 form a sound and strongly complete axiom system characterizing validities of L , θ W on XSNMs (for a finite T). Table 2 Axiom system for L , θ W over XSNM (a, b ∈ A; t, u ∈ T) ϕ for ϕ an instance of a propositional tautology From ϕ → ψ and ϕ infer ψ t 1 a t 2 ∨ t 2 a t 1 t 1 a t 1 (t 1 a t 2 ∧ t 2 a t 3 ) → t 1 a t 3 with ϕ [ψ 2 /ψ 1 ] any formula obtained by replacing one or more occurrences of ψ 1 in ϕ with ψ 2 Proof Soundness follows from the validity of the axioms. Completeness follows from the completeness of the basic system (the table's first half), as the recursion axioms (second half) define a validity-preserving translation from L , θ W to L .

Conclusions and Ongoing/Further Work
As mentioned in the introduction, social networks play a crucial role in agents' interaction: they define the agents' social environment, which is known to affect both their behaviour and their opinions about the world. This paper, part of an ongoing research project on the logical structure of social network creation (Smets and Velázquez-Quesada 2018a), relies on a similarity idea for establishing social connections: the more traits two agents have in common, the more likely it is for them to end up in being socially related. Our main focus has been two fold: first, the study of a closenessbased approach (dual to the distance-based proposal of Smets and Velázquez-Quesada 2017b), and second, the introduction of a subjective ranking on traits (a XSNM model, extending the SNM presented elsewhere), allowing each one of the agents to assign a different weight to each trait, depending on how important the trait is for her. In both cases, the paper has studied not only the properties of the resulting concepts (clos and w-clos), but also the properties of the social relation a threshold strategy yields (the CT and the WTC updates). Also in both cases, the paper has proposing a formal language for describing the given structures (the already existing L for SNM; the introduced L for XSNM) and the changes the respective operations bring about (L θ and L , θ W ), providing also sound and complete axiom systems. As most papers do, this proposal has provided some ideas and results, but it has also left some avenues open for further exploration. Two important ones are (i) a more detailed study of the properties of the networks that result from the proposed updates (in particular, the search for necessary and sufficient conditions to guarantee not only transitivity and 'Euclideanity', but also further relational and graph properties), and (ii) a study on alternative definitions of closeness (the mentioned clos-bis and others), including their properties and the ones of the social relation they create.
A different research path arises from considering different criteria to decide whether two agents will become socially related (obviously, the specific topology of the resulting network depends this). The basic requirement this paper asks for is that of similarity, according to which the more similar two agents are, the more likely it is for them to end up in being socially connected, but of course there are other alternatives. An appealing one is the idea that two agents will be socially connected depending on how well they complement each other. In order to carry out such intuition, one would need a setting in which this notion of 'complementary' can be formally defined. 22 Still, the same similarity approach can be used in yet other ways. First, one could look for alternatives to the threshold strategy, which uses distance/closeness by adding every agent that falls within the range θ establishes; one example is the group size strategy, which uses distance/closeness by accepting the λ agents that are closer to the given one (Smets and Velázquez-Quesada 2019). Second, instead of looking at the differences and/or similarities in the agents' traits, one can look at the differences and/or similarities in their epistemic and/or doxastic state. Moreover, one can also look at weighted versions of these measures, with agents having a priority ordering now over propositions, thus indicating that an agreement on the epistemic/doxastic attitude towards certain propositions is for her more important than an agreement towards others. While we have explored agents with epistemic traits in Smets and Velázquez-Quesada (2017b), in future work we can bring these epistemic ingredients together with the results obtained in this paper.
Nevertheless, some of the most interesting research directions arise from a simple observation: in the presented setting, the agents' traits never change, and therefore neither do their (weighted) distance nor their (weighted) closeness. Thus, sequences of updates coinciding in the last one will produce exactly the same social relation. This somehow counter-intuitive behaviour (social networks tend to change, even if we use the same strategy to update them) suggests that something might be missing in the defined updates (Definitions 12 and 14). One natural way of 'fixing' this issue (thus making these updates' long term behaviour probably more realistic, and definitely more interesting) is to enrich such definitions with conditions referring to the initial social network: after all, current social connections do play a role in creating new ones. One already explored possibility is to add explicitly a social condition, as asking for the existence of a middleman that will allow the new social connection to be established (Smets and Velázquez-Quesada 2017b). Another is to keep the definition as it is, defining now the agents' distance and closeness not in terms of their in differences and similarities in basic traits (those in T), but rather in terms of their differences and similarities on complex ones (those in a more expressive language: see Smets and Velázquez-Quesada 2019). A further one arises when considering models with more than one social network (after all, someone who chooses football as her favourite sport and Lady Gaga as her favourite musician is bound to have different social environments in each one of these contexts); in such cases, connections in one of them might be crucial to create connections in another.
Yet, probably the most obvious alternative is simply to allow actions that change the agents' traits. But this bring us full circle: one of the reasons an agent might change her behaviour or opinions about the world is because of the way her social environment affects her. Indeed, the most interesting to-be-explored aspect of this social-network-creation mechanisms in which an agent's traits/features/beliefs/preferences define her social network, is its interplay with social influence phenomena in which an agent's social network affects her traits/features/beliefs/preferences. Both processes deserve to be studied in tandem, as it is indeed their intertwining what defines the outcome of interaction in multi-agent systems.