<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>A. Kachynskyi);</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute for Information Recording of National Academy of Sciences of Ukraine</institution>
          ,
          <addr-line>Mykoly Shpaka St 2 03037, Kyiv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute”</institution>
          ,
          <addr-line>Prospect Beresteiskyi 37 03056 Kyiv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0003</lpage>
      <abstract>
        <p>To enable a deeper understanding of the complex phenomenon of “mental wars,” a modeling methodology has been developed that integrates the capabilities of modern large language models (LLMs) and graph theory. The primary objective of the study is to transform the existing model by enhancing its depth and detail, thereby revealing the essence, mechanisms, strategic approaches, and consequences of mental wars within the context of hybrid warfare. To achieve this goal, a comprehensive analytical toolkit was applied, including semantic network analysis, modularity-based clustering, and node ranking within graphs. The use of generative artificial intelligence adds particular value, as it not only automatically generates new concepts but also uncovers logical relationships among them - significantly deepening the analysis and enabling a holistic understanding of the architecture of mental warfare. The outcome is an expanded dynamic model - a network of interrelated elements covering the key dimensions of mental wars: their strategic objectives, instruments of influence, key actors, implementation mechanisms, and anticipated consequences. This model serves as an effective analytical tool for investigating informationpsychological operations, predicting their impact, and developing efficient countermeasures in the domain of information security.</p>
      </abstract>
      <kwd-group>
        <kwd>Mental war</kwd>
        <kwd>hierarchical model</kwd>
        <kwd>AI</kwd>
        <kwd>LLM</kwd>
        <kwd>clustering</kwd>
        <kwd>visualization</kwd>
        <kwd>information security1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Let ( H , ) be a finite partially ordered set with a greatest element b. The set H is called a
hierarchy if the following conditions are satisfied:</p>
      <p>There exists a partition of the set H into layers (levels of hierarchy):
where:

</p>
      <p>L1  b – the first level of the hierarchy contains only the greatest element;</p>
      <sec id="sec-1-1">
        <title>L I Lj   for all k  j – these subsets are disjoint.</title>
        <p>k</p>
      </sec>
      <sec id="sec-1-2">
        <title>Each element of H belongs to exactly one of the Lk .</title>
      </sec>
      <sec id="sec-1-3">
        <title>These sets Lk are called layers or levels of the hierarchy.</title>
        <p>Compatibility condition with the order:
If x  y and y  Lk , then x  Lm , where m &gt; k.</p>
        <p>In other words, if one element is smaller than another, it must be located at a lower level of the
hierarchy.</p>
        <p>Sequentiality condition (descending/ascending transition):
For each element x  H :</p>
        <p>If x is a predecessor of x (i.e., x  x , and there is no element z such that x  z  x ), then
x  Lk 1 , if x  Lk .</p>
        <p>Similarly, if x is a successor of x (i.e., x  x , and there is no element z for which x  z  x ),
then x  Lk 1 , if x  Lk .</p>
        <p>That is: every predecessor lies at the next level, and every successor lies at the previous level.</p>
        <p>Under such consideration, the problem can be decomposed into simpler components, after
which the relative degree of interaction between the elements of this hierarchical structure can be
evaluated.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Hierarchical Structure of the Mental War Model</title>
      <p>In the traditional view of mental war as a hierarchical structure, the content of the levels serves the
following purposes:




</p>
      <p>At the first level (L1 – Goals of the mental war), a single element – the focus – is considered
and placed at the top of the hierarchy (war for changing identity).</p>
      <p>At the second level (L2 – Forces and means of the mental war), economic, political, and
social forces influencing the outcome are represented (finance, literature, art in general,
mass media, the Internet, etc.).</p>
      <p>The third level (L3 – Actors of the mental war) consists of actors who manipulate these
forces (government, artists, patrons, etc.).</p>
      <p>The fourth level (L4 – Goals of actors) represents the goals of each actor (changing
perceptions, values, attitudes, stereotypes, traditions, archetypes of national consciousness).
The fifth level (L5 – Policies implemented by actors) describes possible scenarios or
outcomes that each actor aims to achieve through their policies. Primarily, this involves the
recoding not only of the civilization identity of the state but also of the cultural values of
society and the individual.</p>
      <p>Hierarchical decomposition allows structuring the system into subsystems, where each
subsystem is responsible for specific goals. For each level, concepts are defined that form clusters
interacting with each other to achieve the overall objective. The mathematical model helps
formalize interactions between subsystems through graphs, adjacency matrices, and objective
functions that describe the overall system's effectiveness.</p>
      <p>Let us now consider the goals and subgoals at the levels of the considered hierarchical structure.
28</p>
      <p>Levels L1 (main goal) and L4 (goals of individual actors) contain sets of goals and their sub-goals.
Assume that at each level i, there exists a set of goals:</p>
      <p>Ti  Ti1 ,Ti2 ,...,Timi ,
where mi – the number of goals at level i.</p>
      <p>The index j  {1,4} indicates that only levels L1 and L4 are considered.</p>
      <p>Each goal Tij has its own set of sub-goals:</p>
      <p>Fij  Fij1 ,Fij2 ,...,Fijmnij  ,
where nij – the number of sub-goals for the goal Tij.</p>
      <p>For example, Tij is the main strategic goal of the first level. In this context, it may mean:
"The final and irreversible dissolution of Ukrainian identity within the so-called 'All-Russian'
identity, as well as the renunciation by Ukrainians as a political nation of independent statehood
under conditions of losing conscious sense of national self-identity."</p>
      <p>On the other hand, the goals Ti4, which correspond to the actions of specific subjects (actors),
are subordinate to this overarching strategic goal, but may change depending on the historical
period – primarily in terms of implementation methods or means of achievement, rather than in
their essence.</p>
      <p>Elements and sub-goals at all levels (including Fijk) perform certain functions: informational,
economic, organizational, etc. They can be interconnected – both within the same level and across
different levels of the hierarchy, forming a network of interactions.</p>
      <p>These connections can be formally described by a set of pairs:</p>
      <p>Links   Fijk ,Fi' j' k'  | Fijk linked with Fi' j' k' .</p>
      <p>
        Such a system forms a directed graph G, where:


the nodes are the elements, sub-goals, and goals (Fijk),
the edges are the connections between them.
(
        <xref ref-type="bibr" rid="ref3">2</xref>
        )
(
        <xref ref-type="bibr" rid="ref4">3</xref>
        )
(
        <xref ref-type="bibr" rid="ref5">4</xref>
        )
(
        <xref ref-type="bibr" rid="ref6">5</xref>
        )
where:



      </p>
      <p>Let us denote this graph as [6] G=(T, E), where V is the set of vertices (all elements, sub-goals,
goals), E  T  T is the set of directed edges describing functional dependencies.</p>
      <p>For each system element Fijk, one can define a function f  Fijk  , which characterizes its role
within the system. These functions can be represented as rules or formulas that describe how the
element interacts with others.</p>
      <p>To model the process of achieving goals at different levels, we can introduce a target function of
the "mental war" system, denoted by  . This function depends on the success of achieving the
main goals Tij and their sub-goals Fijk:</p>
      <p>   f Tij   1    f  Fijk  ,
  [0,1] is a weight coefficient that determines the importance of achieving the overall
goal compared to the sub-goals;
f(Tij) is a function defining the effectiveness of achieving goal Tij;
f(Fijk) is a function defining the contribution of sub-goal Fijk to achieving the overall
objective.</p>
      <p>This description allows for a formal modeling of the complex structure of mental wars as a
hierarchical-network system with clearly defined connections, functions, and goal-achievement
mechanisms.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Expansion of the Hierarchical Model</title>
      <p>Within the hierarchical structure of mental war, both sub-goals and individual concepts (concepts)
can be defined not only by human experts but also by virtual experts – artificial intelligence
systems that assist in forming and improving the model of goals and related concepts.</p>
      <p>When certain concepts simultaneously belong to multiple different levels of the hierarchy, the
logical connections between these levels become more complex. As a result, the structure ceases to
be purely hierarchical and transitions into a network form, where the relationships between
elements become more flexible and multidimensional.</p>
      <p>Such a network organization allows for more effective modeling of the goal-achievement
process, as it provides more pathways from initial goals to final outcomes through diverse
interconnections.</p>
      <p>Let us formalize this idea for further model expansion using LLM. As before, let
Ti  T1 ,T2 ,...,Tn be the set of levels of the primary hierarchy, and F  F1 ,F2 ,...,Fk  be the set of
concepts. Experts, including virtual ones, define these concepts based on the analysis of the levels
of the primary hierarchical model of mental war. Concepts can belong to multiple levels
simultaneously (including the goals defined above), which makes the connections between the
model's levels more complex. If a concept fi belongs to several levels at once, it introduces new
links between those levels. Now, the system’s structure transitions from a purely hierarchical one
to a network-based model.</p>
      <p>For formalizing this transformation, we use a graph G=(T, E), where T is the set of nodes
representing hierarchy levels, and E is the set of edges, where each edge between two levels
indicates the presence of shared concepts between them.</p>
      <p>
        If a concept fi belongs to levels TA and TB , then there is a connection between them:
E  Ta,Tb  | fi  F, fi  Ta I Tb.
(
        <xref ref-type="bibr" rid="ref7">6</xref>
        )
      </p>
      <p>The weight of each edge Ta,Tb  is determined by the number of shared concepts between these
levels: wTa,Tb   Ta I Tb .</p>
      <p>Thus, the more shared concepts correspond to different levels, the stronger the connection
between them.</p>
      <p>
        Using the network structure allows for more efficient achievement of final outcomes. The
shortest paths in the network between levels (in particular, between the primary goal and the
consequences) allow for reducing time and resources needed to achieve these outcomes. This can
be expressed through a path minimization function in the graph:
 Ti   min  wTa ,Tb , (
        <xref ref-type="bibr" rid="ref8">7</xref>
        )
      </p>
      <p>PG Ta ,Tb P
where P is a path from the initial goal to the required outcome through other levels/concepts.</p>
      <p>Virtual experts can assist not only in defining concepts but also in dynamically updating the
network. This means that experts can add new links or modify existing ones depending on the
context of the mental war. Formally, this is described through a dynamic transformation of the
model’s graph:</p>
      <p>
        G '  G U Ti,Tj  | fi  F, fi  Ti I Tj , new links.
(
        <xref ref-type="bibr" rid="ref9">8</xref>
        )
      </p>
      <p>Such transformation of the hierarchy into a network allows for greater flexibility and faster
adaptation to changes, as well as more efficient use of available resources to achieve desired
outcomes [7]. Links between levels of the original hierarchy, established through shared concepts,
become the basis for selecting the most effective path from the goal to the consequences. This
approach enables the use of cross-level shared concepts, optimizes processes through virtual
experts, and dynamically adapts to new conditions.</p>
      <p>The above formalization corresponds to a sequence of actions that allow for the repetition of the
process under expert supervision until a complete understanding of the domain state is achieved:
1. Presentation of the initial scheme, which includes the creation of an initial scheme in CSV
format, where basic semantic connections between concepts are represented.
2. Development of prompts for LLMs – that is, creating prompts for large language models to
generate new concepts and connections.
3. Integration of new connections into the initial scheme.
4. Linguistic processing of data for evaluation of new and existing connections, as well as
ranking of nodes.
5. Analysis and visualization of data – specifically, loading the data into a graph analysis
system (Gephi), performing clustering based on modularity classes.
6. Formation and refinement of clusters, determining their names using LLMs, checking
consistency, and removing unnecessary elements.
7. Final validation and verification of the extended model, ensuring its coherence and
correctness.</p>
      <p>Thus, the following steps are proposed for expanding the primary hierarchical model based on
the application of large language models.</p>
      <p>The initial scheme of "mental wars" is provided in CSV format, where each line represents a
semantic connection between primary levels in the format "Concept 1; Concept 2", for example:




</p>
      <p>Goals of the mental war; Forces and means of the mental war
Forces and means of the mental war; Actors of the mental war
Actors of the mental war; Goals of actors
Goals of actors; Policies implemented by actors</p>
      <p>Policies implemented by actors; Results of the mental war</p>
    </sec>
    <sec id="sec-4">
      <title>4. Prompt Generation for Creating New Concepts</title>
      <p>The essence of the approach for generating formal probing prompts for LLM lies in representing
prompts as analogs of software constructs (conditional statements, loops, functions) through
mathematical formalization of their logic and interactions. The following main primitives
("building blocks") are used for prompt generation: "Condition", "Loop", and "Function", along with
methods for composing these primitives to build complex systems, particularly semantic networks.</p>
      <p>We will now describe the framework upon which prompts will be subsequently generated by
large language models. These prompts will later be applied for scanning LLMs, executed in turn
within the environment of large language models [8].</p>
      <p>Each primitive in the no-code prompt engineering framework is defined by clear rules for
transforming input data into output. These primitives serve as "building blocks" for constructing
logical structures analogous to programming language operators, but based on natural language.</p>
      <p>Primitive "Condition" (If-Else)
Let:
 Input – input data (e.g., text, numerical parameter, etc.);
 A1  Input , if C  Input   True;
P  Input   </p>
      <p> A2  Input , if C  Input   False.</p>
      <p>This formal definition is analogous to the classical if-else operator in programming languages,
but it is applied through textual instructions.</p>
      <p>The mechanism of the "Condition" primitive consists in passing to the LLM a task with two
possible scenarios, each of which is executed depending on the result of the condition check. For
example:</p>
      <p>"If the text contains the term 'cybersecurity', return its definition; otherwise, return a list of
related terms."</p>
      <p>In this example:
 C – a condition (predicate) that returns the value True or False;
 A₁, A₂ – two possible actions that are executed in cases when the condition is True or False,
respectively.</p>
      <p>The prompt function P is defined as:
 C – the presence of the word "cybersecurity" in the text;
 A₁ – generation of the definition of the term "cybersecurity";
 A₂ – search for associations related to the term "cybersecurity";</p>
      <p>Primitive "Loop" (For-Loop)
Let:
 S  s1, s2 ,..., sn – a set of elements to be processed;
 F – an operation applied to each element of the set.</p>
      <p>The prompt function P(S) is defined as the union of results of applying the operation F to each
element of the set:</p>
      <p> A1  Input , if C  Input   True;
P  Input   </p>
      <p> A2  Input , if C  Input   False.</p>
      <p>This formal definition is analogous to a classic for loop in programming languages, where the
same operation is repeated for all elements of a set.</p>
      <p>The working mechanism of the "Loop" primitive is to pass a list of elements together with an
operation to be applied to each element to the LLM. The result is the union of all obtained
responses. Consider the following example:</p>
      <p>Prompt: "For each term in the list ['phishing', 'firewall'], find 3 usage examples."
Here:
 S = {"phishing","firewall"} – a set of terms;
 F – the operation of finding usage examples for a given term.</p>
      <p>The result will be the union of usage examples for both terms.</p>
      <sec id="sec-4-1">
        <title>Primitive "Function" (Abstraction)</title>
        <p>Let:

</p>
        <p>
          F: X → Y – a function that transforms elements from set X into elements of set Y;
x – an input element;
(
          <xref ref-type="bibr" rid="ref10">9</xref>
          )
(
          <xref ref-type="bibr" rid="ref10">9</xref>
          )
        </p>
        <p>parameter – a set of parameters that control the function’s behavior.</p>
        <p>The prompt function Fextract(x, parameter) is implemented through an instruction passed to the
model:</p>
        <p>
          Fextract(x, parameter) = Prompt(x, instruction with parameter).
(
          <xref ref-type="bibr" rid="ref12">11</xref>
          )
        </p>
        <p>This formal definition is analogous to abstraction in programming languages, where a function
can accept parameters to adjust its internal logic.</p>
        <p>The mechanism of the "Function" primitive is to pass a specific task with parameters to the
LLM, where the parameters define the details of how the task should be executed.</p>
      </sec>
      <sec id="sec-4-2">
        <title>Primitive "Label" (Tagging / Marking)</title>
        <p>Let:
 Input – input data or a previously defined part of the prompt logic;
 Label(Name) – a tag or identifier used to mark a specific section or stage in the prompt
processing flow.</p>
        <p>The prompt function Label is defined as:</p>
        <p>
          Label(Name): Input → Annotated Section.
(
          <xref ref-type="bibr" rid="ref12">11</xref>
          )
        </p>
        <p>This formal definition is analogous to labeling code blocks or sections in programming
languages for reference, navigation, or control flow purposes.</p>
        <p>The "Label" primitive assigns a unique identifier to a specific part of the prompt structure,
enabling logical organization and potential referencing in complex prompt workflows. It does not
perform any action itself but serves as a structural marker.</p>
        <p>This mechanism allows for better readability, modular design, and controlled execution flow
when working with multi-stage prompts in LLM environments.</p>
      </sec>
      <sec id="sec-4-3">
        <title>Primitive "Go To" (Jump / Navigation)</title>
        <p>Let:
 Label(Name) – a predefined label or section identifier;
 GoTo(Name) – an instruction to transfer control or continue execution from the labeled
section.</p>
        <p>The prompt function GoTo is defined as:</p>
        <p>
          GoTo(Name) → Execution resumes at Label(Name).
(
          <xref ref-type="bibr" rid="ref13">12</xref>
          )
        </p>
        <p>This formal definition is analogous to the goto statement in traditional programming, allowing
non-linear control flow by redirecting execution to a labeled section.</p>
        <p>The "GoTo" primitive enables conditional or unconditional redirection within the prompt
processing pipeline. It can be used to repeat certain stages, skip irrelevant ones, or dynamically
change the workflow based on intermediate results.</p>
        <p>These primitives – Label and GoTo – together enable structured navigation and modularity in
complex prompt engineering workflows, enhancing the ability to manage logic flow and improve
prompt reusability in large language model environments.</p>
      </sec>
      <sec id="sec-4-4">
        <title>General Principles of Primitive Selection</title>
        <p>Each primitive must be a precisely defined construct to ensure unambiguous understanding by
the model.
Primitives can be parameterized, allowing them to be adapted to different tasks.</p>
        <p>Primitives can be combined to create complex systems, similar to how programmers write code
using basic constructs.</p>
        <p>The three primitives – "Condition", "Loop", "Go to" and "Function" – form the foundation for
no-code system creation through prompt engineering, enabling natural language to be used as a
tool for controlling the logic of AI systems.</p>
        <p>Such systems represent an orchestration of primitives, analogous to computer programs. The
syntax of prompts forms a language with a formal grammar that can be represented in the form of
an Abstract Syntax Tree (AST) :</p>
        <p>
          Prompt ::= Primitive | (Prompt ⊕ Prompt) | Condition(Prompt, Prompt).
(
          <xref ref-type="bibr" rid="ref14">13</xref>
          )
where ⊕ denotes composition.
        </p>
        <p>To generate a formal prompt for expanding all levels of the initial model while considering
mental wars, the following initial task-prompt is formulated in natural language (see Appendix A).</p>
        <p>After processing this prompt to generate a formal prompt for accomplishing the given task
using an LLM, the resulting structured prompt is provided in Appendix B.</p>
        <p>The structure of the structured prompt is illustrated in Fig. 1.
The generated prompt uses all the formal primitives of the proposed prompt engineering language
as follows:
According to the responses from LLM systems, additional files in CSV format are generated. For
the example provided, the file will look like this:</p>
        <p>STAGE
Initialization
Parsing
Expansion Loop
Node Expansion
Final Output</p>
        <p>PRIMITIVES INVOLVED
Label(INIT),Input
Label(PREPARE_NETWORK), Function(ParseNetwork)
Label(EXPAND_LOOP), Loop(i=1 to K)
Label(EXPAND_PARENT), Label(EXPAND_CHILD)
Condition(ExistsSimilarConcepts)
A1(AddToNetwork), A2(NoAction)</p>
        <p>Label(FINAL_OUTPUT), Function(FormatOutput)
Goals of the mental war; Change of national identity
Goals of the mental war; Forces and means of the mental war
Forces and means of the mental war; Literature
Forces and means of the mental war; Art
Forces and means of the mental war; Mass Media
Forces and means of the mental war; Social Media
Forces and means of the mental war; Actors of the mental war
Actors of the mental war; Artists
Actors of the mental war; Government
Actors of the mental war; Painters
Actors of the mental war; Goals of individual actors of the mental war
Goals of individual actors of the mental war; Changing perceptions
Goals of individual actors of the mental war; Changing values
Goals of individual actors of the mental war; Changing attitudes
Goals of individual actors of the mental war; Changing national consciousness
…</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Integration of Obtained Responses with the Initial Schema</title>
      <p>The newly identified connections are integrated into the initial schema. The network consists of
semantically related concepts and is not causal in nature; consistency checks of the new links can
be carried out using the following approaches: the detection approach is implemented
automatically – if a new concept or link already exists in the network, the weight of that node or
link is increased.</p>
      <p>At this stage, the new links obtained from the LLM are merged with the original schema. To
account for the significance of the links, a formula for iterative adjustment of the corresponding
link weights is used:</p>
      <p>
        Snew    Sold    Snew,
(
        <xref ref-type="bibr" rid="ref15">14</xref>
        )
 Snew – the new weight coefficient of the link;
 Sold – the weight of the existing link;
  – the weighting coefficient for old links;
  – the weighting coefficient for existing links.
      </p>
      <p>The old link Sold represents the weight of the existing connection between concepts in the
semantic network. The new link Snew is the weight coefficient calculated for the new links added
35
based on new data from the LLM.</p>
      <p>The coefficients  and  allow control over the influence of each type of link on the overall
network.</p>
      <p>The formula enables the calculation of a new weight coefficient as a combination of the weight
values of both old and new links, where the coefficients  and  help adjust the balance
between existing and new data.</p>
      <p>Within this approach, conflict checking is performed by involving a human expert who verifies
whether the new links introduce contradictions within the context of already existing ones, by
assessing similarity or differences in the relationships between concepts.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Linguistic Data Processing</title>
      <p>Linguistic expansion enabled the connection of additional pairs that were previously undetected in
the main chains. Linguistic processing of data and node ranking allows for the combination of
concepts that are synonyms, derivations of one another, etc. For this purpose, a specialized
software tool embedded in the graph analysis and visualization service CSV2Graph is used [9].</p>
      <p>All pairs now include:
 semantically related concepts (e.g., "Confidentiality" and "Integrity" );
 lexically similar concepts (e.g., "Protection" and "Data Protection" );
 new connections emerging through context (e.g., "System" and "Component" ).</p>
      <p>This completes the construction of the full list of pairs, taking into account linguistic expansion.
The structure is now ready for further analysis or integration into the network.</p>
      <p>Here is an example of new connections obtained after linguistic processing:</p>
      <p>Morale; Moral relativism
Morale;Erode morale
Morale;Undermining morale
Morale;Psychological demoralization
Morale;Decreased morale
Morale;Moral decline
Morale;Demoralizing the population</p>
      <p>Morale;Demoralization</p>
    </sec>
    <sec id="sec-7">
      <title>7. Data Analysis and Visualization in Gephi</title>
      <p>
        Node prioritization across hierarchical levels – including goal-oriented nodes and conceptual
entities – is carried out using a concept-ranking methodology grounded in the PageRank and
TextRank algorithms [10, 11]. The ranking score for a given node A is computed as:
1  d PR(i) (
        <xref ref-type="bibr" rid="ref16">15</xref>
        )
PR( A)   d  ,
      </p>
      <p>N iM ( A) L(i)
where:
 PR(A) – PageRank of node A;
 d – damping coefficient;
 N – total number of nodes in the graph;
 M(A) – set of nodes linking to A;
 L(i) – number of outgoing links from node i.
The second term, d 
iM ( A) L(i)</p>
      <p>1  d
The first term of the formula, , ensures a baseline PageRank level for all nodes. The</p>
      <p>N
numerator corresponds to the probability of a random state when a user randomly selects a node in
the graph, and N is the total number of nodes.</p>
      <p>PR(i)</p>
      <p>is the part of the formula used to calculate the PageRank of
node A based on the PageRanks of nodes pointing to it. For each node i in the set M(A), its
PageRank is divided by the number of outgoing links L(i), and this value is summed across all nodes
pointing to A.</p>
      <p>This approach enables the identification of structurally and semantically central concepts
within the network by iteratively evaluating their connectivity and contextual relevance.</p>
      <p>The combined data are loaded into the Gephi software environment [12] for clustering based on
modularity classes. There are various types of modularity measures [13] that can be applied in
Gephi; the authors employed the Potts model [14], which accounts for so-called resolution limits.
Based on this model, the required number of concept classes (clusters) is automatically determined.</p>
    </sec>
    <sec id="sec-8">
      <title>8. Creation of the Final Model</title>
      <p>At this stage, the extended model is verified to ensure its consistency and correctness within the
context of both new and existing concepts. Irrelevant elements are removed, and the final model is
represented in the form of a graph. The final model illustrates an expanded network of concepts
and their interconnections within the context of "mental wars" (Fig. 2), visualized using Gephi [12]
to enhance clarity, reveal structural patterns, and facilitate dynamic exploration of relationships
between nodes.</p>
    </sec>
    <sec id="sec-9">
      <title>9. Results</title>
      <p>After analysis and clustering, several additional concepts that were not accounted for in
previous models were identified. For instance, the concepts of "information asymmetry" and
"cognitive traps" proved to be key to understanding mental wars within this network model.</p>
      <p>Node ranking using the PageRank algorithm allowed for the identification of the most
influential concepts in the model. This helped determine which elements are most significant for
further study (see Table 1) and refinement (excluding the initially defined ones, which naturally
turned out to be the centroids of the clusters).
(16)
   2.24 is the estimated exponent of the power-law distribution;
 xmin = 1 is the minimum value at which the power-law behavior begins;
 C is the normalization constant.</p>
      <p>To test the accuracy of the power-law model, a statistical measure – the K-S test
(KolmogorovSmirnov test) [15] – was used. The Kolmogorov-Smirnov test shows a high level of agreement
between the empirical and theoretical distributions (K-S = 0.04), confirming the correctness of the
approximation.</p>
      <p>The analysis of the statistical properties of the MW network confirmed the existence of nodes
with high degrees, which are practically absent in networks governed by Poisson or exponential
degree distributions. It is precisely the presence of such nodes that explains the observed
behavioral patterns and gives rise to many unique characteristics of scale-free networks.
10.Conclusions
As a result of the conducted research, a methodology for expanding the graph model of mental
wars using tools of generative artificial intelligence, particularly large language models, was
developed and implemented. This made it possible not only to refine and supplement the existing
hierarchical structure but also to transition to a network-based model that ensures flexibility,
adaptability, and in-depth analysis of interconnections between key concepts.</p>
      <p>The use of a "swarm of virtual experts" [3] proved effective in generating new concepts and
connections. Each agent contributes uniquely, enabling a multidimensional picture of mental wars.
An important role in the modeling process was played by the proposed no-code programming
framework for prompt engineering. It is based on three main primitives – "Condition", "Loop", "Go
to", and "Function" – which allow formalizing the logic of interaction with LLM, ensuring
systematicity, repeatability, and control over the generation process of new concepts and
relationships. The framework implements a Map–Reduce approach: first, the logic of the prompt is
decomposed in detail through formal constructs, and then a compact textual query is formed that is
effectively perceived by the model. This approach significantly improves the quality of results,
reduces the number of errors, and simplifies verification.</p>
      <p>Applying formalized approaches to constructing prompts for LLM enabled systematic
generation of new concepts, establishing logical links between them, and integrating the resulting
data into a unified semantic network. A crucial stage involved the use of clustering algorithms by
modularity classes and node ranking via PageRank, which facilitated the identification of dominant
concepts and the formation of a structured model of mental warfare.</p>
      <p>Among the most important concepts identified during the study are: "culture", "language",
"change of national identity", "social media", "religion", "societal polarization", "mythologization of
history", and others. These concepts have significant influence on shaping strategies and
consequences of mental wars.</p>
      <p>Furthermore, the study revealed new aspects not considered in previous models – notably, the
concepts of "information asymmetry" and "cognitive traps", which substantially explain the
mechanisms of psychological influence in hybrid warfare conditions.</p>
      <p>Analysis of statistical characteristics of the obtained network confirmed its scale-free nature
typical of complex systems, and indicated the presence of highly connected nodes that play a key
role in spreading influence within mental warfare.</p>
      <p>Thus, the proposed model can be used as a tool for analyzing information-psychological
influences, predicting their consequences, and developing counter-strategies. It is particularly
worth noting the importance of implementing the no-code programming framework to systematize
work with LLM, which ensures scalability, transparency, and high quality of results obtained.</p>
      <p>Future research will focus on improving the model through integration of additional natural
language processing methods, involving a larger number of virtual experts, and implementing
causal relationship analysis technologies to deepen understanding of the phenomenon of mental
wars.
11.Appendices
Appendix A: Initial Task-Prompt Formulation in Natural Language
war</p>
      <p>Policy implementation for goals of the mental war: Language
Policy implementation for goals of the mental war: Religion
Policy implementation for goals of the mental war: Culture
Policy implementation for goals of the mental war: Historical Memory
Policy implementation for goals of the mental war; Results of the mental war
Results of the mental war; Recoding of Ukrainians' views on the state
Results of the mental war; Recoding of Ukrainians' views on society</p>
      <p>Results of the mental war; Recoding of Ukrainians' views on the individual
Appendix B: Formal Structured Prompt Derived from Initial Task Description
Label(INIT):
Input:
– Theme = "Mental War"
– K = 6
–Initial Network = [
"Goals of the mental war; Change of national identity",
"Goals of the mental war; Forces and means of the mental war",
"Forces and means of the mental war; Literature",
"Forces and means of the mental war; Art",
"Forces and means of the mental war; Mass Media",
"Forces and means of the mental war; Social Media",
"Forces and means of the mental war; Actors of the mental war",
"Actors of the mental war; Artists",
"Actors of the mental war; Government",
"Actors of the mental war; Painters",
"Actors of the mental war; Goals of individual actors of the mental war",
"Goals of individual actors of the mental war; Changing perceptions",
"Goals of individual actors of the mental war; Changing values",
"Goals of individual actors of the mental war; Changing attitudes",
"Goals of individual actors of the mental war; Changing national consciousness",
"Goals of individual actors of the mental war; Policy implementation for goals of the
mental war",
"Policy implementation for goals of the mental war; Language",
"Policy implementation for goals of the mental war; Religion",
"Policy implementation for goals of the mental war; Culture",
"Policy implementation for goals of the mental war; Historical Memory",
"Policy implementation for goals of the mental war; Results of the mental war",
"Results of the mental war; Recoding of Ukrainians' views on the state",
"Results of the mental war; Recoding of Ukrainians' views on society",
"Results of the mental war; Recoding of Ukrainians' views on the individual"
]
Label(PARSE_NETWORK):
Function(ParseNetwork, NetworkString):
Return list of concept pairs ("Concept1", "Concept2")
Label(EXPAND_NETWORK_LOOP):
Loop over i from 1 to K:</p>
      <p>Label(EXPAND_NODES):
Loop over each pair (Parent, Child) in Network:</p>
      <p>Label(EXPAND_PARENT):
Function(ExpandNode, Parent, Theme):
Condition(ExistsSimilarConcepts(Parent)):</p>
      <p>A1: ForEach SimilarConcept in GetSimilarConceptsLLM(Parent, Theme):</p>
      <p>AddToNetwork(Parent, SimilarConcept)</p>
      <p>A2: NoAction
Label(EXPAND_CHILD):
Function(ExpandNode, Child, Theme):
Condition(ExistsSimilarConcepts(Child)):</p>
      <p>A1: ForEach SimilarConcept in GetSimilarConceptsLLM(Child, Theme):</p>
      <p>AddToNetwork(Child, SimilarConcept)</p>
      <p>A2: NoAction
Label(FINAL_OUTPUT):</p>
    </sec>
    <sec id="sec-10">
      <title>Declaration on Generative AI</title>
      <p>During the preparation of this work, the authors used ChatGPT and Qwen to: translate certain text
fragments from their native language, perform grammar and spelling checks, and paraphrase or
reword content. After using these tools, the authors reviewed and edited the content as needed and
take full responsibility for the publication’s content.</p>
    </sec>
    <sec id="sec-11">
      <title>References</title>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <string-name>
            <surname>Function(FormatOutput</surname>
          </string-name>
          , Network):
          <article-title>Return list of strings in format "Concept1; Concept2"</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Lo</surname>
            ,
            <given-names>J.H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Huang</surname>
            ,
            <given-names>H.P.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Lo</surname>
            ,
            <given-names>J.S.</given-names>
          </string-name>
          ,
          <year>2025</year>
          .
          <article-title>LLM-based robot personality simulation and cognitive system</article-title>
          .
          <source>Scientific Reports</source>
          ,
          <volume>15</volume>
          (
          <issue>1</issue>
          ), p.
          <fpage>16993</fpage>
          . DOI:
          <volume>10</volume>
          .1038/s41598-025-01528-8
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Srinivasan</given-names>
            <surname>Ramanujam</surname>
          </string-name>
          .
          <article-title>The LLM Revolution: Transforming Industries with Large Language Models</article-title>
          .
          <source>Kindle Edition</source>
          ,
          <year>2024</year>
          . https://www.amazon.com/LLM-
          <string-name>
            <surname>Revolution-TransformingIndustries-</surname>
          </string-name>
          Language-ebook/dp/B0D7VS5BNK
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Abu-Salih</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alotaibi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Alanazi</surname>
            ,
            <given-names>A.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Abukhurma</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Al-Shboul</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Khouri</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Aljaafari</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <year>2025</year>
          .
          <article-title>Using Large Language Models for Semantic Interoperability: A Systematic Literature Review</article-title>
          .
          <source>ICT Express</source>
          . DOI:
          <volume>10</volume>
          .1016/j.icte.
          <year>2025</year>
          .
          <volume>06</volume>
          .011
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Shu</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sun</surname>
          </string-name>
          , X. and Cheng, H.,
          <year>2024</year>
          ,
          <string-name>
            <surname>October.</surname>
          </string-name>
          <article-title>When llm meets hypergraph: A sociological analysis on personality via online social networks</article-title>
          .
          <source>In Proceedings of the 33rd ACM International Conference on Information and Knowledge Management</source>
          . pp.
          <fpage>2087</fpage>
          -
          <lpage>2096</lpage>
          . DOI:
          <volume>10</volume>
          .1145/3627673.3679646
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Kachynskyi</surname>
            <given-names>A.B.</given-names>
          </string-name>
          <article-title>Structurally-functional model of the system for ensuring information and information-psychological security</article-title>
          .
          <source>Reports of the National Academy of Sciences of Ukraine</source>
          .
          <year>2023</year>
          . №1. С.
          <volume>16</volume>
          -
          <fpage>23</fpage>
          .
          <article-title>(ukr</article-title>
          .
          <source>language) DOI: 10.15407/dopovidi2023.01.016</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Singh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rose</surname>
            <given-names>Anish</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Verma</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          et al.
          <article-title>A data decomposition-based hierarchical classification method for multi-label classification of contractual obligations for the purpose of their governance</article-title>
          .
          <source>Sci Rep</source>
          <volume>14</volume>
          ,
          <issue>12755</issue>
          (
          <year>2024</year>
          ). DOI:
          <volume>10</volume>
          .1038/s41598-024-63648-x
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Zgurovsky</surname>
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pankratova</surname>
            <given-names>N.D.</given-names>
          </string-name>
          <article-title>System analysis: Theory and applications</article-title>
          . Springer Science &amp; Business
          <string-name>
            <surname>Media</surname>
          </string-name>
          ,
          <year>2007</year>
          . - 447 p.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Dmitry</given-names>
            <surname>Lande</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Leonard</given-names>
            <surname>Strashnoy</surname>
          </string-name>
          .
          <article-title>An Advanced No-Code Programming Framework for Complex Problems in LLM Environments. ResearchGate Preprint</article-title>
          .
          <source>DOI: 10.13140/RG.2.2.25307</source>
          .89129 (
          <issue>May</issue>
          ,
          <year>2025</year>
          ). - 14 pp.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Busch</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Lande</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <year>2025</year>
          . Semantische Dokumentenindexierung mit generativer KI.
          <source>Mitteilungen der Vereinigung Österreichischer Bibliothekarinnen und Bibliothekare</source>
          ,
          <volume>78</volume>
          (
          <issue>1</issue>
          ). DOI: https://doi.org/10.31263/voebm.v78i1.
          <fpage>9251</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Page</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brin</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Motwani</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Winograd</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <article-title>The PageRank Citation Ranking: Bringing Order to the Web</article-title>
          .
          <source>Stanford InfoLab</source>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Mallick</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dutta</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Das</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sarkar</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>Graph-Based Text Summarization Using Modified TextRank</article-title>
          . In: Nayak,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Abraham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Krishna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            ,
            <surname>Chandra Sekhar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Das</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          . (eds)
          <article-title>Soft Computing in Data Analytics</article-title>
          .
          <source>Advances in Intelligent Systems and Computing</source>
          , vol
          <volume>758</volume>
          . Springer, Singapore. URL:
          <volume>10</volume>
          .1007/
          <fpage>978</fpage>
          -981-13-0514-6_
          <fpage>14</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bruns</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Snee</surname>
          </string-name>
          .
          <article-title>How to Visually Analyse Networks Using Gephi</article-title>
          .
          <source>SAGE Publications</source>
          , Limited, London,
          <year>2022</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Traag</surname>
            <given-names>V. A.</given-names>
          </string-name>
          <string-name>
            <surname>From</surname>
          </string-name>
          <article-title>Louvain to Leiden: guaranteeing well-connected communities / V. A</article-title>
          .
          <string-name>
            <surname>Traag</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Waltman</surname>
          </string-name>
          , N. j.
          <source>van Eck. Sci Rep</source>
          <volume>9</volume>
          ,
          <issue>5233</issue>
          (
          <year>2019</year>
          ). DOI:
          <volume>10</volume>
          .1038/s41598-019-41695-z.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>F. Y.</given-names>
            <surname>Wu</surname>
          </string-name>
          .
          <article-title>The Potts model</article-title>
          .
          <source>Rev. Mod. Phys</source>
          .
          <volume>54</volume>
          ,
          <fpage>235</fpage>
          - Published 1
          <year>January 1982</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [15]
          <string-name>
            <surname>Closas</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Coma</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          and
          <string-name>
            <surname>Méndez</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <year>2012</year>
          .
          <article-title>Sequential detection of influenza epidemics by the Kolmogorov-Smirnov test</article-title>
          .
          <source>BMC medical informatics and decision making</source>
          ,
          <volume>12</volume>
          (
          <issue>1</issue>
          ), p.
          <fpage>112</fpage>
          . DOI:
          <volume>10</volume>
          .1186/
          <fpage>1472</fpage>
          -6947-12-112
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>