You are on page 1of 27

CSE-538 Advanced Software Engineering

Sem Long Assignment


Final Report, November 2022

Group Members:
Aditishree, 18074002
Meera Joshi, 18074010

Problem Statement:
To propose and implement a Group Decision Making (GDM) model that deals with detecting
and managing the non-cooperative / manipulative behavior of decision makers.

In this report, we describe the problem statement and the relevant terms in detail which are
required as the foundation for the project.

Section 1: Understanding the Problem

Group Decision Making(GDM):


GDM includes the involvement of several people who collaborate to make a decision. Each
person, called decision-maker, can have particular reasons or priorities and may therefore
approach the decision process from a different angle, however, all experts have a shared interest
in finding an ultimate agreement on choosing the best choice(s).

There are two steps involved to solve GDM problems:

1. Consensus Process: It is a dynamic and iterative process of several rounds in which


decision makers discuss and modify their preferences or opinions to reach a certain level
of general agreement.

2. Selection Process: In the selection process, a solution is obtained from all given
preferences. For reaching a decision that can reflect the opinion of every individual in the
group, it is required to achieve a high degree of consensus. .

Fuzzy Preference Relation:


A fuzzy preference relation is the most used representation format of preferences to model the
assessments verbalized by the decision makers because of their ease of use and utility when
aggregating the assessments expressed by the individual decision makers into group ones and
their efficiency as an instrument to model decision making processes.
A classical fuzzy GDM scenario is defined as a situation in which:
- there is a problem to solve
- a collection of alternatives, X={x1,…,xn}
- and a group of decision makers or experts, E={e1,…,em}, characterized by their own
knowledge and background, who convey their preferences or opinions about the
collection of alternatives to reach a joint decision.

A fuzzy preference relation on a collection of alternatives X is a fuzzy set on the Cartesian


product X × X, that is, it is characterized by a membership function
μPR:X × X →[0,1].

Then, a fuzzy preference relation PR is usually modeled by the n × n matrix PR = (prij), being
prij = μPR (xi ,xj ), (∀i,j ∈ {1,…,n})
interpreted as the preference degree of the alternative xi over xj .
In particular:
- prij = 0.5 indicates indifference between xi and xj
- prij = 1 indicates that xi is absolutely preferred to xj
- prij > 0.5 indicates that xi is preferred to xj.

Based on this interpretation, we have that prii = 0.5 ∀i ∈ {1,…,n}. In addition, since prii’s do
not matter, they are usually written as ‘-‘ instead of 0.5.

Non-cooperative / manipulative behavior of decision makers:


The consensus reaching process is challenging for GDM problems due to the complexity and
uncertainty caused by large groups of participants.

One prominent challenge is non-cooperative behaviors or minority opinions in GDM.

The consensus reaching process takes place in several rounds. After each round, the decision
makers send their modified decisions based on the feedback obtained from the previous round, in
order to reach a high degree of group consensus. Non-cooperative behavior means that the
decision makers are unwilling to modify their preferences in order to reach group consensus, and
might even undermine the consensus reaching.

Since the presence of non-cooperative behaviors will not only bias the consensus-reaching
process, but also hinder and prolong the consensus-reaching process, they need to be identified
and properly handled.
This project aims to propose and implement a model that can deal with non-cooperative
behaviors of decision makers.

Section 2: Preliminaries: Definitions and Issues

Assume that 𝑋 = {𝑥1, 𝑥2 , ..., 𝑥𝑛} is a set of feasible alternatives.

1. Utility Value Assume that 𝑢 = { 𝑢1 , 𝑢2 ,..., 𝑢𝑛 } is the set of utility values provided by
one of the decision makers (DMs). 𝑢𝑖 ϵ [0, 1], 𝑖 = 1, 2,..., 𝑛 represents the utility values
of alternative 𝑥𝐼 . Generally, higher utility value represents a more important alternative.

2. Preference ordering. Let 𝑂 = { 𝑜1 , 𝑜2 ,..., 𝑜𝑛 } be a preference ordering set. This set is


the permutation function over the set {1, 2,..., 𝑛 }. 𝑜𝑖denotes the positional order of
alternative 𝑥𝑖 in 𝑋 = { 𝑥 1 ,..., 𝑥 𝑗 ,..., 𝑥 𝑛 }.

3. Multiplicative preference relation For a given set of alternatives, the multiplicative


preference relation is represented by a pairwise comparison matrix (PCM). It contains
2
𝑛 preference elements that belong to [1/9, 9], whose entries represent the preference
degree for the two alternatives.
Assume that the matrix 𝐴 = (𝑎𝑖𝑗)𝑛×𝑛 , 𝑖, 𝑗 = 1, 2,..., 𝑛 is a PCM provided by DMs. The
entry 𝑎𝑖𝑗 of the PCM represents the degree of preference for alternative 𝑥𝑖over 𝑥𝑗 . In this
setting, “9” means that the alternative completely dominates the others, while “1”
indicates that two alternatives are equal. The PCM satisfies 𝑎𝑖𝑗𝑎𝑗𝑖 = 1 and 𝑎𝑖𝑗 > 0 .
An example PCM is:

4. Fuzzy Preference relation: A fuzzy preference relation is also determined by a PCM,


and each element indicates the degree that an alternative is preferred to another. Let
𝑃 = (𝑝)𝑛×𝑛 , 𝑖, 𝑗 = 1, 2,..., 𝑛 be a fuzzy preference relation. In contrast with the
multiplicative preference relation, the values of an additive PCM range from zero to one
and satisfy 𝑝𝑖𝑗 + 𝑝𝑗𝑖 = 1.
Formally, an FPR 𝑃 on a finite alternative set 𝑋 is characterized by a membership
function
𝜇𝑝 ∶ 𝑋 ×𝑋 → [0, 1], 𝜇𝑝 (𝑥𝑖 , 𝑥𝑗 ) = 𝑝𝑖𝑗 , 𝑝𝑖𝑗 + 𝑝𝑗𝑖 = 1, ∀𝑖, 𝑗 ∈ {1, 2, … , 𝑛}, 𝑝 𝑖𝑗
indicates the preference degree of the alternative 𝑥𝑖over 𝑥𝑗 . A value of “1” shows the
alternative completely dominates the other, while a value of “0.5” shows that both are
equal. An example is:

2. Consensus Reaching Process (CRP)


After obtaining the DMs’ preference opinions, a classical selection process can be used to obtain
a solution. Sometimes, DMs may believe that their opinions have not been fully considered
because they do not agree with the decision result. To obtain a decision result that is accepted by
the whole group, it is necessary to include a CRP, which is an iterative process in which DMs
reason, discuss and modify their preferences to achieve a consensus. There are two main types of
consensus models:

1. Feedback Mechanism based


2. Opinion Evolution based

2.1 Feedback Mechanism Based:


The general framework of a traditional CRP is depicted in the following figure, which consists of
five key phases:
1. Gathering preferences
2. Consensus measure
3. Consensus control
4. Feedback mechanism
5. Selection.

2.1.1 Real-world scenario explaining why feedback mechanism based CRP fails:
● In real decision making processes, the DMs’ opinions will evolve in response to their
interactions. Thus, consensus models formally based on opinion evolution have been
introduced.
● In some situations, DMs might be dishonest, and try to engage other DMs into trust
relationships with them to assemble a clique to manipulate decision results. This type of
group malicious or simply undermining is called trust relationship manipulation behavior
and it needs to be taken seriously.
● There may also be DMs who are not intentionally manipulative for a given purpose, but
they may engage in malicious behaviors that are not conducive to the legitimate intent of
the CRP, such as dishonest, disobedient or divergent behaviors [17]. This type of
non-cooperative behavior can significantly decrease the consensus efficiency and should
be addressed in the CRP.

2.2 Opinion Evolution


Peoples’ emotions, thoughts or behaviors are naturally liable to change through interaction with
others. In legitimate GDM situations, the actors’ opinions will evolve due to social influence
factors.

2.2.1 DeGroot Model: Let {𝑒1, 𝑒2, … , 𝑒𝑚} be a set of actors. A weighting matrix
𝑊 = (𝑤𝑖𝑗)𝑚×𝑚 is utilized to depict the relationship among the actors, where 𝑤𝑖𝑗 represents the
𝑚
direct influence of actor 𝑒𝑗 to 𝑒𝑖 and satisfies 𝑤𝑖𝑗≥ 0 and ∑ 𝑤𝑖𝑗 = 1 for all 𝑖, 𝑗 ∈ {1, 2, … , 𝑚}.
𝑗=1

2.2.2 Social connection strength: Assuming the decision makers to be the nodes in a directed
graph, For a directed graph 𝐺(𝑉 , 𝐿) with 𝑉 = {𝑣1, 𝑣2, … , 𝑣𝑚}, we use the membership
function 𝜇𝑅 : 𝑉 × 𝑉 ⟶ [0, 1], 𝑠𝑖𝑗 = 𝜇𝑅(𝑣𝑖 , 𝑣𝑗) to define the weighted adjacency matrix
𝑆 = (𝑠𝑖𝑗) 𝑚×𝑚 , , where 𝑠𝑖𝑗means the social connection strength from 𝑣𝑖 to 𝑣𝑗 .

2.2.3 Interaction Strength We investigate and analyze the trust relationships among DMs by
referring to their interaction frequency in the interaction network that is taken into account in the
decision process. The existence of a connection between two users usually implies that they can
communicate with each other.

The interaction strength between DMs 𝑒ℎ and 𝑒𝑙 can be measured by their interaction frequency
𝑓ℎ𝑙 . The normalized interaction strength between 𝑒ℎ and 𝑒𝑙 can be represented as:
𝑚𝑖𝑛
𝑓ℎ𝑙−𝑓ℎ
𝐼𝑆ℎ𝑙 = 𝑚𝑎𝑥 𝑚𝑖𝑛
𝑓ℎ −𝑓ℎ
2.2.3 Strength of trust: A DM is more likely to trust those DMs who have high interaction
strengths with them, therefore, a simple rule can be utilized to ascertain whether there exists trust
from 𝑒ℎ to 𝑒𝑙:

where 𝜈 is the threshold value. If the normalized interaction strength is lower than 𝜈, then the
interaction strength can be ignored, in other words, only high interaction strength is taken to
exert trust on DMs’ opinions.

Section 3: Solution

Solution steps:
1. Determining the relationship between decision makers
2. Manipulative Behavior
a. Detection of manipulative behavior
b. Management of manipulative behavior
3. Consensus Reaching Process
a. Reaching Consensus Degree
b. Feedback adjustment
4. Non-cooperative Behavior
a. Detection of non-cooperative behavior
b. Management of non-cooperative behavior
5. Complete Algorithm

1: Determining the relationship between decision makers

We assume that we have the data of interaction of decision makers (DMs) through some
networking app like Whatsapp or Microsoft Teams. We calculate the relationship among DMs by
referring to their interaction frequency on the app that is taken into account in the decision
process. In the social network graph, the connection between two users implies that they can
communicate with each other. The interaction strength between between DMs 𝑒ℎ and 𝑒𝑙 in the
network can be measured by their interaction frequency 𝑓ℎ𝑙 . The normalized interaction strength
between 𝑒ℎ and 𝑒𝑙 can be represented by:
𝑚𝑖𝑛
𝑓ℎ𝑙 − 𝑓ℎ
𝐼𝑆ℎ𝑙 = 𝑚𝑎𝑥 𝑚𝑖𝑛
𝑓ℎ − 𝑓ℎ

𝑚𝑖𝑛 𝑚𝑎𝑥
where 𝑓ℎ and 𝑓ℎ are the minimum and maximum interaction frequency from 𝑒ℎ to other
DMs, respectively. Here, we can consider that a DM is more likely to trust those DMs who have
high interaction strengths with them, therefore, strength of trust (𝑆𝑇ℎ𝑙) can be determined as:
𝑆𝑇ℎ𝑙 = {𝐼𝑆ℎ𝑙 𝑖𝑓 𝐼𝑆ℎ𝑙 > 𝑣 𝑎𝑛𝑑 ℎ ≠ 𝑙 , 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒 }
where 𝑣 is the threshold value.

Thus, the corresponding graph will be a directed graph, which can be denoted as 𝐺(𝐸, 𝐿), where
𝐸 = {𝑒1 , 𝑒2 , …, 𝑒𝑚} represents the set of DMs, and 𝐿 the set of edges which represents whether
they trust each other. 𝑆𝑇 = (𝑆𝑇ℎ𝑙)𝑚×𝑚 is the weighted adjacency matrix corresponding to DMs’
trust network 𝐺(𝐸, 𝐿) and 𝑃𝑘 = (𝑝 𝑘𝑖𝑗)𝑛×𝑛 is the FPR provided by 𝑒𝑘 .
The subgroups can be detected by the following Algorithm:

A DM in the set {𝑒𝑘 |𝑒𝑖 → 𝑒𝑘 , for all 𝑒𝑖 ∈ 𝑉 ∕𝑒𝑘 } is called an opinion leader, otherwise he/she is
a follower.
2: Manipulative Behavior
a. Detection
In a social network, manipulative behavior has three key characteristics. We define each
characteristic mathematically and combine them to find the DMs involved in manipulative
behavior. We define one rule for each characteristic and identify the involved DMs as follows:

R1) The preferences of these DMs differ significantly from other DMs. The deviation between
DM ek’s opinion and collective opinion can be defined as:

Where Pc is the collective preference matrix obtained as:


𝑚
𝑐
𝑃 = ∑ 𝑤𝑘𝑃𝑘
𝑘=1

Let α(α ∈ [0, 1]) be the deviation threshold.


→ If 𝑁𝐶1k ≥ 𝛼, we deduce that 𝑒𝑘 differs greatly from the collective opinion.

R2) The DMs’ preferences are heavily inclined to a specific alternative. This case becomes
evident if the DM evaluates one alternative as much higher than other alternatives. We define
this higher preference as:

𝑛
𝑘
Where, 𝑙 = arg max 𝑖∈{1,2,…,𝑛} min 𝑗≠𝑖 (𝜑(𝑥 𝑖 ) 𝑘 − 𝜑(𝑥 𝑗 ) 𝑘 ) and 𝜑(𝑥𝑖 ) = ∑ 𝑝𝑖𝑗 .
𝑘 𝑗=1

𝑛
𝑐
Let 𝑁𝐶2 (𝑙) = min𝑗≠𝑙 (𝜑(𝑥𝑙 ) 𝑐 − 𝜑(𝑥𝑗 ) 𝑐 ), where 𝜑(𝑥𝑙 ) = ∑ 𝑝𝑙𝑗 and β ∈ [0, 1] be the
𝑐 𝑗=1
evaluation threshold such that β > 𝑁𝐶2(𝑙).
→ If 𝑁𝐶2k (l) ≥ β, we deduce that evaluation of 𝑒𝑘 is heavily inclined to alternative 𝑥𝑙 .
𝑙
→ Let 𝑀𝐵 be the set of DMs whose evaluations differ greatly from others and are heavily
𝑙
inclined to alternative 𝑥𝑙, then 𝑀𝐵 = {𝑒𝑘 |𝑁𝐶k1 ≥ 𝛼 ∧ 𝑁𝐶𝑘2 (𝑙) ≥ 𝛽}.

R3) The DMs involved in manipulation behaviors are often linked to several common DMs in
the interaction network.
Let all DMs be divided into 𝑠 sub-groups 𝐸1 , 𝐸2 , …, 𝐸𝑠 (1 ≤ 𝑠 ≤ 𝑚). The set of opinion leaders
and followers in 𝐸𝑘 are denoted as 𝐸k𝑙𝑒𝑎𝑑𝑒𝑟 and 𝐸k𝑓𝑜𝑙𝑙𝑜𝑤𝑒𝑟 respectively. Let 𝑚𝑘 and 𝑚𝑘∗ be the number
of DMs and opinion leaders in the sub-network 𝐸𝑘 .
Let 𝑀𝐵𝑖𝑘 represents the set of members in 𝐸𝑘 who satisfy rules R1 and R2 (for alternative 𝑥𝑖), i.e.
𝑀𝐵𝑖 𝑘 = 𝑀𝐵𝑖 ∩ 𝐸𝑘 .

→ If there is at least an opinion leader in 𝑀𝐵𝑖 𝑘 , i.e. 𝑀𝐵𝑖𝑘 ∩ 𝐸 𝑘𝑙𝑒𝑎𝑑𝑒𝑟 ≠ ∅, then we induce that DMs
in 𝑀𝐵𝑖𝑘 perform manipulation behaviors and the opinion leaders in 𝑀𝐵𝑖 𝑘 are the initiators of this
kind of behavior.

b. Management of Manipulative behavior


We use the weight penalization method to remove the impact of manipulators from the decision
making process. Given a DM 𝑒ℎ with manipulation behavior, Algorithm 2 is designed to update
his corresponding weight 𝑤ℎ .

Algorithm 2: Procedure to update weights of manipulators

● If 𝑁𝐶ℎ 2 (𝑙) = 0, it means 𝜑(𝑥1)ℎ = 𝜑(𝑥2 )ℎ = ⋯ = 𝜑(𝑥𝑛)ℎ , which means these alternatives are
the same for DM 𝑒ℎ . We do not consider this case.
● In Algorithm 2, the penalty factor 𝜚ℎ is used to penalize the weight of manipulator 𝑒ℎ.
● Here, 𝜚ℎ ∈ [0, 1] and 𝑤′ℎ is bounded to the [0, 𝑤ℎ ].

3: Consensus reaching process

a. Computation of Consensus Degree

● After removal of manipulators, the interaction network will be updated again using
Algorithm 1 and it will be divided into several sub-networks and outliers.
● For evaluating consensus degree and implementing feedback mechanism, the DMs in the
same subnetwork are included in a sub-group and all the outliers are included in a
subgroup.
● Suppose that there are 𝑠* sub-groups in the CRP, denoted as 𝐺ℎ , ℎ = 1, 2, …, 𝑠∗ , where
the sub-group 𝐺s* is the sub-group whose members are the outliers. Let 𝑀𝐵 be the set of
manipulators and #𝑀B be the number of manipulators.
● The weights of the manipulators are obtained by Algorithm 2 and other DMs’ weight are
𝑤𝑘
normalized according to the manipulators’ weights, i.e., 𝑤𝑘 = 𝑚−#𝑀𝐵
(1 − Σ𝑒 ∈𝑀𝐵𝑤𝑖).
𝑖

● The consensus degree of DM 𝑒𝑘 can be calculated as


𝑛 𝑛
𝑘 𝑐 1 𝑘 𝑐
𝐶𝐷 = 𝑑(𝑃𝑘, 𝑃 ) = 𝑛(𝑛−1)
∑ ∑ (1 − |𝑝 𝑖𝑗
− 𝑝 𝑖𝑗|), 𝑘 = 1, 2,...., 𝑚.
𝑖=1 𝑗=1, 𝑗≠𝑖
● The consensus degree of 𝐺ℎ can be obtained by
ℎ 𝑘 *
𝐴𝐶𝐷 = ∑ λ𝑘𝐶𝐷 , ℎ = 1, 2,...., 𝑠
𝑒𝑘∈𝐺ℎ
𝑤𝑘
Where λ𝑘 = Σ𝑒𝑙 𝑤𝑙
.
∈𝐺ℎ

● Let γ be the consensus threshold. If all the sub-groups’ consensus levels are higher than
the threshold 𝛾, then the consensus has been reached.
● The best alternative will be decided by the score value
𝑛
𝑐
ϕ(𝑥𝑖) = ∑ 𝑝 𝑖𝑗
𝑗=1
● The sub-groups whose consensus degrees are lower than 𝛾 are identified as the
incompatible sub-groups, we call these a part of GLT, i.e., 𝐺𝐿𝑇 = {𝐺𝑘 |𝐴𝐶𝐷𝑘 < 𝛾}.

b. Feedback adjustment process:


The moderator provides feedback to adjust the consensus degree.
● If the group of outliers is incompatible: Each DM in Gs* having 𝑁𝐶1k ≥ 1- 𝛾 is advised by
the moderator to modify their preference such that the preference in next round is
between the preference in current around and the collective preference. Formally, the
suggestion for round t+1 is given as:

● If a subgroup other than outliers is incompatible: In a subgroup, there will be discussions


among DMs before giving their updated preference. Each DM ek has some level of trust
on other experts, so their decision would be based on:
○ ek’s trust on other DMs of the subgroups and those DM’s preference
○ ek’s trust on the moderator and the feedback given by moderator
○ ek’s trust on themself
We assume that each DM has provided the values of their trust on the moderator and
themself. The first can be obtained by ST graph. We obtain a weighted trust matrix TDk
of size mk x mk+1 for the subgroup Gk, where entry TDkij represents the DM ek’s trust on:
○ Other DMs for 𝑗 ≠ 𝑖, 𝑗 < 𝑘 + 1
○ Moderator for 𝑗 = 𝑘 + 1
We normalize TDk so that the sum of values in each row is one. The normalized matrix is
called the relative trust matrix for subgroup Gk. For self-appraisal values of each DM z, we
obtain the influence matrix as:

𝑊 𝑘 = (𝑤 𝑘𝑖𝑗 ) 𝑚 𝑘 ×(𝑚 𝑘 +1) = 𝑑𝑖𝑎𝑔(𝒛) + (𝐼 𝑚 𝑘 − 𝑑𝑖𝑎𝑔(𝒛))𝑇 𝐷 𝑘


It can be shown that the sum of each row in Wk is 1.
Then, the preference matrix of each DM in Gk in the next round t+1 can be given as the weighted
average (which is same as the sum since sum of each row in weights is 1) of each DMs and
moderator’s preference, and the weights are obtained by the influence matrix.
(𝑡+1) (𝑡)
𝑝𝑖 𝑗 = 𝑊𝑘 × 𝑝𝑖 𝑗 , 𝑡 = 0, 1, 2, …

The process ends when the consensus degree of Gk exceeds the threshold γ.

4. Non Cooperative Behavior

a. Detection
Some DMs may refuse to change their opinions, or dishonestly change (for example, making
only slight changes). This is termed as non-cooperative behavior. We identify non-cooperative
behavior in the case of outliers and subgroups as follows:

● Outliers: The DMs may modify their opinion only slightly, or in a direction opposite to
what is suggested in the feedback. To identify this, we define consensus adjustment
frequency as:
𝑘,𝑡 𝑘,𝑡−1 𝑘,𝑡 𝑘,𝑡−1
𝑁𝐶3 = (𝑁𝐶1 − 𝑁𝐶1 )∕𝑁𝐶1 , 𝑡 = 1, 2, …
It can be noted that:
𝑘,𝑡
→ 𝑁𝐶3 ≤ 1
𝑘,𝑡
→ Larger 𝑁𝐶3 means better adjustment to reach consensus
𝑘,𝑡
→ 𝑁𝐶3 < 0 means adjustment is in opposite direction than feedback
We define ζ as the efficiency threshold, then the set of DMs in outliers performing non
cooperating behavior can be identified as:
𝑘,𝑡 𝑘,𝑡
𝑁𝐵 = {𝑒𝑘 |𝑁𝐶1 ≥ 1 − 𝛾 ∧ 𝑁𝐶3 ≤ 𝜁}.
● Subgroups: For subgroups, it is possible that a DM is willing to cooperate, but is not
𝑘,𝑡
persuaded enough by others, hence, a lower or negative value of 𝑁𝐶3 cannot determine
non-cooperative behavior. However, if this continues for a long period, then they are
showing non-cooperative behavior. Therefore, if the above conditions hold for T
successive rounds, we say that the DM is showing non-cooperative behavior. Formally,
𝑘,𝑡+𝑇1 𝑘,𝑡+𝑞
𝑁𝐵 = {𝑒 𝑘 |𝑁𝐶1 ≥ 1 − 𝛾 ∧ 𝑁𝐶3 ≤ 𝜁 𝑓𝑜𝑟 𝑞 = 1, 2, … , 𝑇1}.
In our project, we take 𝑇1 = 2
b. Management
There are generally two ways to manage such behavior:
● Weight Penalizing
● Discarding Preferences of such DMs
We use the following algorithm to reduce the trust and weight of these DMs, so that their
contribution to CRP decreases. The idea is to make the punishment on weight and trust large if
the relative consensus adjustment efficiency is low.

5. Complete Algorithm
The complete algorithm can be summarized as follows:

Algorithm 4
Input:
𝑙
- DMs’ initial opinions 𝑃𝑙 = (𝑝𝑖𝑗 )𝑛×𝑛, 𝑙 = 1, 2, … , 𝑚
- DMs’ interaction network on a social networking app such as Whatsapp or Teams
- the DMs’ weighting vector 𝜔 = (𝜔 1 , 𝜔 2 , … , 𝜔 𝑚 )
- the deviation threshold 𝛼
- evaluation threshold 𝛽
- consensus threshold 𝛾
- efficiency threshold 𝜁
- round number 𝑡 = 0
- DMs’ self appraisal vector z
- Moderator’s trust vector 𝜏
Output: The ranking of the alternatives and 𝑡.

Step 1: By Algorithm 1, the DMs can be classified into different sub-groups 𝐸 𝑘 (𝑘 = 1, 2, …) and
their corresponding opinion leader sets 𝐸 𝑘 𝑙𝑒𝑎𝑑𝑒𝑟 (𝑘 = 1, 2, …) can also be obtained.
Step 2: Identify whether there are manipulators by the rules R1, R2 and R3. If there are
manipulators, go to step 3, otherwise go to step 4.
Step 3: Apply the Algorithm 2 to update the weights of DMs. Remove the manipulators from the
sub-network and obtain the updated sub-groups.
𝑐 ℎ
Step 4: Calculate the collective opinion 𝑃 and consensus degree 𝐴𝐶𝐷 of each sub-group.. If all
the sub-groups’ consensus levels are higher than the threshold 𝛾, go to step 9, otherwise, go to
step 5.
Step 5:
- Identify the sub-groups whose consensus levels are lower than the threshold 𝛾, i.e.,
𝐺𝐿𝑇 = {𝐺 𝑘 |𝐴𝐶𝐷 𝑘 < 𝛾}.
- If the sub-group whose members are the outliers satisfies 𝐺 𝑠 ∗ ∈ 𝐺𝐿𝑇 , then the DM
𝑒 ℎ ∈ 𝐺 𝑠 ∗ satisfying 𝑁𝐶 1 ℎ, 𝑡 ≥ 1 − 𝛾 will be advised by the moderator to modify
their preferences in the round 𝑡 + 1 as described for outliers.
- For the sub-group whose members are within a sub-network, if 𝐺 𝑘 ∈ 𝐺𝐿𝑇 , then the
moderator will provide suggestion and ask the members to discuss. Their preferences will
evolve as described for subgroups.
- If the consensus degrees of the identified sub-groups are larger than 𝛾, then go to step 9,
otherwise, go to next step.
Step 6: Identify the sets of DMs showing non-cooperative behavior from both outliers and
subgroups, as defined in the detection process.
Step 7: If there are DMs performing non-cooperative behaviors, then go to step 8, otherwise go
back to step 5.
Step 8: By Algorithm 3, the weights and trust values of the DMs can be updated. Go back to step
4.
𝑛
𝑐
Step 9: Decide the best alternative using score value ϕ(𝑥𝑖) = ∑ 𝑝 𝑖𝑗, as described.
𝑗=1
Step 10: End.
Section 4: Code with each algorithm step

Code Link: Github

import numpy as np

'''
Defining global variables
'''

# evaluation threshold
beta = 0.2
# consensus threshold
gamma = 0.75 # changed from .75 to test
# deviation threshold
alpha = 0.20
# efficiency threshold
chi = 0.05

# m - no. of experts
m = 5
# n - no. of alternatives
n = 4
# P - 3d preference relation matrix of dimension m*n*n (FPR)
P = [
[[0.5, 0.44, 0.40, 0.36],
[0.56, 0.5, 0.79, 0.58],
[0.60, 0.21, 0.5, 0.98],
[0.94, 0.42, 0.02, 0.5]],

[[0.5, 0.22, 0.99, 0.39],


[0.78, 0.5, 0.37, 0.32],
[0.01, 0.63, 0.5, 0.35],
[0.61, 0.68, 0.65, 0.5]],

[[0.5, 0.14, 0.11, 0.01],


[0.86, 0.5, 0.44, 0.05],
[0.89, 0.56, 0.5, 0.06],
[0.99, 0.95, 0.94, 0.5]],

[[0.5, 0.11, 0.62, 0.55],


[0.89, 0.5, 0.82, 0.04],
[0.38, 0.18, 0.5, 0.98],
[0.45, 0.96, 0.02, 0.5]],

[[0.5, 0.97, 0.43, 0.18],


[0.03, 0.5, 0.56, 0.50],
[0.57, 0.44, 0.5, 0.49],
[0.82, 0.50, 0.51, 0.5]]
]

P = np.array(P)

weights = [0.3, 0.2, 0.2, 0.1, 0.2]


weights = np.array(weights)

trustMat = np.array([[0. , 0.7, 0.2, 0.3, 0.5],


[0.1, 0. , 0.4, 0.9, 0.7],
[0.5, 0.4, 0. , 0. , 0.2],
[0.1, 0.8, 0. , 0. , 0.3],
[0.7, 0.3, 0.2, 0.4, 0. ]])

selfTrust = np.random.rand(5)
selfTrust = np.round(selfTrust, 1)

moderatorTrust = np.random.rand(5)
moderatorTrust = np.round(moderatorTrust, 1)

Obtain the collective Preference Matrix, Pc


def collective_matrix(w, P): # w is normalized weights after algo2 for
consensus measuring, and original for finding manipulating experts
Pc = np.zeros((n,n))
for k in range(m):=
Pc = Pc + w[k]*P[k]
return Pc
print(collective_matrix(weights,P))

Obtain NC1, according to Rule 1 for identifying Manipulative Behavior:

def NC1(k,Pc,P):
temp = np.abs(P[k] - Pc) #for the case i=j, both Pij and Pcij are 0.5,
so the difference does not contribute to sum, same as in paper
nc1 = np.sum(temp)
nc1 = nc1/(n*n - n)
return nc1

Obtain NC2, according to Rule 2 for identifying Manipulative Behavior:

def NC2(k):
phi_k = np.sum(P[k],1) # 1D array having sum of preference of each
alternative
print("phi_k: ", phi_k)
l = -1
nc2= -999
for i in range(n):
min_val = 999
for j in range(n):
if j!=i:
diff = phi_k[i]-phi_k[j]
min_val = min(min_val, diff)
if min_val>nc2:
nc2 = min_val
l = i
return nc2,l

Obtain Collective NC2 for lth alternative:


def collectiveNc2(Pc,l):
# integer having sum of collective preference of lth alternative
phi_xl = 0
for i in range(n):
phi_xl += Pc[l][i]
phi_xj = np.sum(Pc,1) # 1D array having sum of collective preference of
each alternative=
collective_nc2 = 999
for i in range(n):
if phi_xl > phi_xj[i]:
collective_nc2 = min(collective_nc2, phi_xl-phi_xj[i])
return collective_nc2

Obtain the groups in the network as shown in Algorithm 1. The function detectSubgroups return
a list of lists, where each inner list denotes a group and contains two lists, the first having leaders
and the second having followers in that group.
# Sub-network detection method based on WeChat-like interaction network
def detectSubgroups(trustMat, k=1): #trustMat is the mxm trust matrix
m = trustMat.shape[0]
# step 1
C = np.identity(m) + trustMat
for i in range(m):
for j in range(m):
if C[i][j] > 0:
C[i][j] = 1
#print(C)
#step 2
Ebar = []
nc = []
for i in range(m):
nci = np.count_nonzero(C[:,i])
#print(trustMat[:,i])
if nci > 0:
Ebar.append((nci, i))
Ebar.sort(reverse=True)
print(Ebar)
#step 3
groups = []
while Ebar:
ejk = Ebar[0][1]
ncjk = Ebar[0][0]
EkLeader = []
for i in Ebar:
ncp = i[0]
ep = i[1]
if ncjk == ncp and C[ejk][ep]==1:
EkLeader.append(ep)
# E bar = Ebar \ EkLeader
Ebar = [i for i in Ebar if i[1] not in EkLeader]
print("Group ", k)
k+=1
print("EkLeader:", EkLeader)
#print(Ebar)
EkFollower = []
for i in Ebar:
ei = i[1]
for j in EkLeader:
if C[ei][j] == 1:
EkFollower.append(ei)
break
#print(Ebar)
# E bar = Ebar \ EkFollower
Ebar = [i for i in Ebar if i[1] not in EkFollower]
print("EkFollower:", EkFollower)
#print(Ebar)
EkLeader.sort()
EkFollower.sort()
Ek = [EkLeader, EkFollower]
groups.append(Ek)
return groups

Update weights of the manipulators as described in Algorithm 3.


#Procedure to update weights of manipulators
def sigmah(h,collective_nc2,Pc,P):
nc2h = NC2(h)[0]
num = collective_nc2/nc2h
num = num*(1-NC1(h,Pc,P))
den = 1+ (1 - (collective_nc2/nc2h))*NC1(h,Pc,P)
# print("expert: ", h, "nc2h: ", nc2h, "collective: ", collective_nc2)
# print("num: ", num, "den: ", den )
return num/den
def update_MBweights(weights, nc2l, Pc, manipulatorIndices,P):
for i in manipulatorIndices:
sigma = sigmah(i,nc2l,Pc,P)
weights[i] = weights[i]*sigma

Helper function to normalize weights of remaining DMs after the manipulator weights are
penalized.

# normalize weights of other DM's


def normalize_weights(MBexperts, weights):
mb_experts_sum = 0
for expert in MBexperts:
mb_experts_sum += weights[expert]
nfactor = (1-mb_experts_sum)/(m - len(MBexperts))

for i in range(m):
if i not in MBexperts:
weights[i] *= nfactor
# print("in normalize: ", weights, "factor: ", nfactor)
return weights

Obtain consensus degree of an expert


def consensus_degree_expert(k, Pc):
temp = 1-(np.abs(P[k] - Pc)) #for the case i=j, both Pij and Pcij are
0.5, so the difference does not contribute to sum, same as in paper
consensus_degree = np.sum(temp)/(n*(n-1))
return consensus_degree

Obtain consensus degree of a group


def lambda_den(group):
w_sum = 0
for l in group:
for expert in l:
w_sum+=weights[expert]
return w_sum
def consensus_degree_groups(groups,Pc):
ACD = []
for group in groups:
w_sum = lambda_den(group)
cd_group = 0
for l in group:
for expert in l:
lambdak = weights[expert]/w_sum
cd_group += lambdak*consensus_degree_expert(expert,Pc)
ACD.append(cd_group)
return ACD

def consensus_degree_groups(groups,Pc):
ACD = []
for group in groups:
w_sum = lambda_den(group)
cd_group = 0
for l in group: # l is for the two lists, leader and follower
for expert in l:
lambdak = weights[expert]/w_sum
cd_group += lambdak*consensus_degree_expert(expert,Pc)
ACD.append(cd_group)
return ACD

Obtain influence matrix representing how the extent by which an expert’s decision is influenced
by other’s decisions, manipulator, and their own previous decision.
# influence matrix matrix
def getInfluenceMatrix(group, trustMat = trustMat, selfTrust =
selfTrust, moderatorTrust = moderatorTrust):
mk = len(group)
TD = np.zeros((mk, mk+1))
z = []
# print(trustMat.shape)
for i in range(mk):
for j in range(mk):
TD[i][j] = trustMat[group[i]][group[j]]
TD[i][mk] = moderatorTrust[group[i]]
z.append(selfTrust[group[i]])

#normalize TD
sum_of_rows = TD.sum(axis=1)
TD = TD / sum_of_rows[:, np.newaxis]
# obtain influence matrix W for this group
q = np.eye(mk) - np.diag(z)
W = np.c_[np.diag(z), np.zeros(mk)] + np.matmul(q, TD) #equation 14
return W

Obtain the preference of an expert in the next round after feedback, based upon the influence
matrix and moderator’s suggestion that is based on the collective Pc of the previous round.
def getNextPreference(group, Pt, Pct):
# here and in getInfluenceMatrix, group is assumed to be a list of
experts, not list of list having leaders and followers
Wk = getInfluenceMatrix(group)

# obtain pij, of size (mk+1)*(m)*(m), current preferences of these


experts and Pc
pij = []
for i in group:
pij.append(Pt[i])
pij.append(Pct)
pij = np.array(pij)

#evolved preferences
pNext = []
mk = len(group)
for i in range(mk): #obtain next preference of each expert as per eq
15
prefI = np.zeros((n,n))
for j in range(mk+1):
prefI += Wk[i][j]*pij[j]
pNext.append(prefI)
pNext = np.array(pNext)
# print(pNext.shape)
return np.array(pNext)
Identify Manipulators involved in Non-cooperative behavior
def identifyNB(flatG,Pc,Pc_prev,P,Pprev):
NB = []
for k in flatG:
nc1 = NC1(k,Pc,P)
nc1_prev = NC1(k,Pc_prev,Pprev)
nc3 = (nc1_prev - nc1)/nc1_prev
if nc1 >= (1-gamma) and nc3 <= chi:
NB.append(k)
return NB

Update weights of experts involved in Non-cooperative behavior


def update_NBweights(weights,NB,Pc,P):
for ek in NB:
weights[ek] = weights[ek]*(1-NC1(ek,Pc,P))

Obtain score of an alternative based on it’s preference by all experts


def score(Pc,i):
sum =0
for j in range(n):
sum+=Pc[i][j]
return sum

Running all the steps, as in Algorithm 4


# The main steps of the GDM method
def GDM(P=P, trustMat = trustMat, weights=weights, alpha = alpha, beta =
beta, gamma = gamma, chi = chi, t=0):
# see if the graph shows trust mat, or interaction strength from which
trust mat is to be calculated
#step 1
groups = detectSubgroups(trustMat)
print("Sub-groups in interaction network are: ",groups)
#step 2
Pc = collective_matrix(weights, P)
print("Collective Matrix Pc: ", Pc)
#experts that greatly differ from other experts
R1experts = []
for k in range(m):
nc1k = NC1(k,Pc,P)
if nc1k >= alpha:
R1experts.append(k)
print("R1 experts: ",R1experts)
#experts that are inclined towards some alternative l
R2experts = []
MB = {}

for k in range(m):
nc2k, l = NC2(k)
# print(k, ":", nc2k)
collectiveNC2 = collectiveNc2(Pc,l) #generally, we choose beta >
nc2l, that has to be implemented
# print("collectiveNC2:", collectiveNC2)
if nc2k >= beta:
R2experts.append((l,k))
if k in R1experts:
if l not in MB: MB[l] = [k]
else: MB[l].append(k)
print("R2 experts: ", R2experts)
# print("experts following R1 and R2 supporting some alternative: ",
MB)
#R3
groups = detectSubgroups(trustMat)
nGrps = len(groups)
MBexperts = {} # dict having the alternative and corresponding
manipulative experts

MBexpertsList = [] # list having all MBexperts


for i in MB:
MBi = MB[i]
for ek in groups:
MBik = [j for j in MB[i] if j in ek[0] or j in ek[1]] # eq 6 -
members in group Ek who follow R1 and R2 for alternative xi
if set(MBik) & set(ek[0]):
# MBexperts += MBik #eq 7 - If these have an opinion leader, we
say that these experts are involved in manipulative behaviour
if i not in MBexperts:
MBexperts[i] = MBik
else: MBexperts[i].exted(MBik)
MBexpertsList += MBik
print("Manipulating experts for alternatives: ", MBexperts)

'''Step 3: Update weights of Manipulating DMs, normalize weights of


other DMs,
remove manipulators and obtain updated subgroups
'''

MBorNBexists = True

#To get back to step 3, i.e keep updating weights until manipulative or
non-coopertaive behaviour exists
while MBorNBexists:

# print(weights)
# Update weights
for alternative in MBexperts:
update_MBweights(weights, collectiveNc2(Pc, alternative), Pc,
MBexperts[alternative],P)
# print(weights)
weights = normalize_weights(MBexpertsList, weights)
# print("normalized weights", weights)
# remove manipulative experts from subgroups
for group in groups:
group[0] = [i for i in group[0] if i not in MBexpertsList]
group[1] = [i for i in group[1] if i not in MBexpertsList]
# print(MBexpertsList)
# print(groups)

'''Step 4: Obtain updated collective matrix using equation 8, and


consensus degree of each updated subgroup
'''
Pc = collective_matrix(weights, P)

# GLT - groups with consensus degree lower than gamma


ACD = consensus_degree_groups(groups,Pc)
# print("Aggregated consensus degree: ", ACD)
GLT = []
for i in range(len(groups)):
if(ACD[i]<gamma):
GLT.append(i)
# print("GLT: ",GLT)
# print("ACD: ", ACD)

GLT = [groups[0]]
# print("groups: ", groups)

'''Step 5: CRP for groups with consensus degree less than gamma
'''
gamma = .95 #to test
for g in GLT:
# for subgroups with memeber in GLT (non outliers)
# print(g)
# print("flat", flatten(g))
cdg = consensus_degree_groups([g], Pc)
# print("gamma: ",gamma, "CD: ", cdg)
# if the consensus degree of this group has not reached threshold
r=0
while cdg[0] < gamma:
# print(cdg[0])
# for h in range(1):
r = r + 1
print("consensus degree after round", r,": ", cdg)
# obtain next evolution based on feedback
flatG = flatten(g)
Pnext = getNextPreference(flatG, P, Pc)

P_prev = P
# update P as per Pnext
for i in range(len(flatG)):
P[flatG[i]] = Pnext[i]
# update Pc
Pc_prev = Pc
Pc = collective_matrix(weights, P)
cdg = consensus_degree_groups([g], Pc)
# print(cdg)

''' Step 6: Identify non cooperative behaviour


'''
NB = identifyNB(flatG,Pc,Pc_prev,P,P_prev)
if r == 1:
print("Experts with Non-Cooperative behaviour: ", NB)

'''Step 7: If there are DMs with NC Behaviour, penalize weights


using Algo 3 and repeat
'''
#complete this
# influenceMat = getInfluenceMatrix(NB) #NB contains non
coopeartive beharioral experts in this group

update_NBweights(weights,NB,Pc,P)
# if NC behavior exists, make it true so that the loop from step
3 continues
if NB: MBorNBexists = False

print("Final consensus degree: ", cdg)


'''Step 9: Selection
'''
# selected = 0
# max_score = -999
# for i in range(n):
# score_i = score(Pc,i)
# print(i, ":", score_i)
# if(score_i>max_score):
# max_score = score_i
# selected = i

scores = [score(Pc, i) for i in range(n)]


print("Scores of alternatives are: ", scores)
print("Selected: ", scores.index(max(scores)))
# if MBexperts:
# #step 3
# update_MBweights(weights, collectiveNC2(, Pc, MBexperts)
# print(weights)
GDM()

Section 5: Output

You might also like