Phoster

Research and Development

Alignment and Contextual Action Selection

Introduction

The challenge addressed here is that of ensuring that applicable rules, laws, and regulations are loaded into artificial-intelligence agents' working memories as they encounter wide, potentially open-ended, sets of situations.

By agents being able to search for, retrieve, and load applicable rules, laws, and regulations into their working memories, they could be in alignment with these items and subsequently select actions in accordance with them.

The same components with which to enable these capabilities for artificial-intelligence agents could be of additional use for developing contextual search engines for rules, laws, and regulations.

Contextual search engines would advance the fields of legal information retrieval, legal informatics, and computational law. Combined with natural-language understanding and related technologies for comprehending stories, individuals would be able to input natural-language stories to establish those contexts with which to retrieve applicable rules, laws, and regulations.

Beyond providing search results sorted with respect to numerical measures, e.g., relevance, contextual search engines could be explainable. Explainable contextual search engines could provide one or more arguments concerning the applicability of each search result to provided stories and their elements.

There are also to consider conversational explainable contextual search engines where search engines could, through dialogue, ask questions about narrated stories to better retrieve applicable rules, laws, and regulations.

Alignment

The goal of artificial-intelligence alignment is to ensure that artificial intelligence systems are properly aligned with human values (Gabriel, 2020).

This goal can be phrased as: (1) agents doing what they are instructed to do, (2) agents doing what they are intended to do, (3) agents doing what humans' behavior reveals them to prefer, (4) agents doing what humans would, if rational and informed, want them to do, (5) agents doing what is in the best interests of humans, objectively, or (6) agents doing what they morally ought, as defined by human individuals and society.

Agents are expected to comply with rules, laws, and regulations. The number of rules, laws, and regulations is expected to be vast. For each rule, law, and regulation, for each considered action, an agent is expected to verify that that action is in compliance. Ideally, agents will be able to act in real-time while performing these computations.

Information Retrieval

"In any given matter, before legal reasoning can take place, the reasoning agent must first engage in a task of 'law search' to identify the legal knowledge – cases, statutes, or regulations – that bear on the questions being addressed. This task may seem straightforward or obvious, but upon inspection, it presents difficult problems of definition and is challenging to represent in a tractable formalization that can be computationally executed" (Dadgostari, Guim, Beling, Livermore, & Rockmore, 2021).

Contextual search engines could be of use for agents to search for and retrieve those rules, laws, and regulations applicable to their internal states, world models, and working memory contents.

These search engines could be explainable, providing arguments concerning the applicability of retrieved items. These arguments might involve variable bindings, provide structured knowledge alongside natural-language content, use boilerplate natural-language generation, or use large language models.

These search engines could be conversational and, through dialogue, ask questions about narrated stories to better retrieve applicable rules, laws, and regulations.

Conversational explainable contextual search engines for rules, laws, and regulations will either be external or internal to artificial-intelligence agents.

If conversational explainable contextual search engines are to be external to agents, protocols could be utilized by them to: (1) initiate sessions, (2) transmit relevant aspects of their internal states, world models, and working memory contents, (3) synchronize relevant aspects of their dynamic internal states, world models, and working memory contents to remote contexts by transmitting updates, deltas, or differences, and (4) close sessions.

If conversational explainable contextual search engines are to be internal to agents, then performance optimizations are possible including that applicable rules, laws, and regulations could be attached to or otherwise referenced by agents' computational representations of their internal states, world models, and working memory contents. However, even in this case, it may be desired to be able to independently update sets of rules, laws, and regulations without having to retrain or fine-tune models.

Internal States, World Models and Working Memory

Agents' internal states, world models, and working memory contents are often influenced by those inputs arriving from the perception of environments. Agents' perceptions can be, reciprocally, affected by their internal states, world models, and working memory contents. Agents' internal states, world models, and working memory contents can also influence internal dynamics and transitions between their internal states, per feedback.

When modeling internal states, world models, and working memories for the development of artificial-intelligence agents, one can consider situation models and their updating, generalization, and transfer of learning. Situation models are types of mental models from the study of story comprehension. Generalization involves the use of past learning by an agent if the conditions in a new situation are regarded as being similar. Transfer of learning occurs when agents apply information, strategies, and skills they have learned in one context to a new one.

With respect to states, a simple analogy involving graphs has long been adopted throughout artificial intelligence. In this analogy, each node corresponds to a state and each edge to a state transition. States could, however, also be represented by sets of nodes. A probabilistically-weighted set of nodes could be a state. A population of artificial neurons could be a state.

By representing states with multiple nodes or artificial neurons, it can be envisioned that "similar" states would tend to have overlapping nodes or artificial neurons.

The nodes or artificial neurons comprising states could be connected, via sets of weighted edges, to various kinds of resources which could be cued or loaded into agents' working memories when activated beyond a threshold.

Inspectability and Verifiability

Agents' internal states, world models, and working memory contents could be inspected to determine whether applicable rules, laws, and regulations were properly loaded and available.

Techniques for inducing agents' internal states, world models, and working memory contents include narration, simulation and the related replaying of environments, and other forms of direct or manual induction.

In addition to collecting event logs involving agents' internal states, world models, and working memories, multi-track streams and recordings of these and their dynamics could be created to be accompanied by recordings of agents' environments.

Specifying the desirabilities, or values, of artificial-intelligence agents' selections of particular actions, for particular states of worlds, is unwieldy beyond a very limited set of state-action-value tuples. The purpose of machine learning is to train on a subset of states and have the resulting agent generalize an ability to choose high-value actions in unencountered circumstances (Nay, 2022). As agents with varying architectures for internal states, world models, and working memories learn from datasets and from experiences in environments, as agents generalize, their inspectability and verifiability will prove to be of considerable importance.

In the future, these development and operational processes of inducing contexts to verify that applicable rules, laws, and regulations are loaded into systems could be increasingly computer-aided or, perhaps, automated.

Automated Reasoning and Decision-making

With respect to aligned, time-critical, fault-tolerant decision-making processes and procedures pertaining to action selection, some processes and procedures have direct correlates in artificial neural networks, others are fast and automatic, and others are slower and deliberative.

Looking to nature, the basic functional architecture of the brain evolved to mediate real-time interactions with the world and this requires animals to continuously specify and select between sets of potential actions (Cisek, 2007). The brain is highly capable of concurrent processing with respect to both multiple demands for and multiple opportunities for actions.

Opportunities for actions could be either acted upon concurrently, combined or "blended" together, or, in particular when mutually-exclusive, selected from by means of various decision-making processes and procedures.

It should be possible to detect inconsistencies before potential rules, laws, and regulations are added to collections. That said, what if a set of applicable items simultaneously loaded into an agent's working memory were inconsistent?

Related research topics include multiple-text comprehension. Multiple-text comprehension results from processes and strategies with which readers make sense of complex topics or issues based on information presented in multiple texts. These processes and strategies are necessary when readers encounter multiple challenging, conflicting documents on complex issues (Anmarkrud, Bråten, & Strømsø, 2014; List & Alexander, 2017; Richter & Maier, 2017).

Potential heuristics for handling inconsistencies in sets of rules, laws, or regulations loaded into agents' working memories include: logging an event and then safely pausing, consulting a human operator, utilizing any weights or priorities on items, preferring older items, preferring newer items, preferring more specific items, making use of a meta-rule system (Jagadish, Mendelzon, & Mumick, 1996), and performing automated reasoning and decision-making.

Related Work

Hybrid artificial-intelligence architectures include those capable of searching for, retrieving, loading, adapting, creating, and storing computational representations of rules, laws, and regulations.

Large-language-model-based agents and multi-agent systems could query legal informatics and search components in their workflows to search for and retrieve applicable rules, laws, and regulations (Wu, Bansal, Zhang, Wu, Zhang, Zhu, Li, Jiang, Zhang, & Wang, 2023).

Stateful large-language-model-based agents and multi-agent systems are recently being explored (Wu, Yue, Zhang, Wang, & Wu, 2024).

Embedding vectors could be used to represent agents' states and vector databases could be used to store and retrieve applicable rules, laws, and regulations.

Uses of multi-objective reinforcement learning with respect to artificial-intelligence alignment are recently being explored (Rodriguez-Soto, Serramia, Lopez-Sanchez, & Rodriguez-Aguilar, 2022).

Bibliography

Anmarkrud, Øistein, Ivar Bråten, and Helge I. Strømsø. "Multiple-documents literacy: Strategic processing, source awareness, and argumentation when reading multiple conflicting documents." Learning and Individual Differences 30 (2014): 64-76.

Cisek, Paul. "Cortical mechanisms of action selection: The affordance competition hypothesis." Philosophical Transactions of the Royal Society B: Biological Sciences 362, no. 1485 (2007): 1585-1599.

Dadgostari, Faraz, Mauricio Guim, Peter A. Beling, Michael A. Livermore, and Daniel N. Rockmore. "Modeling law search as prediction." Artificial Intelligence and Law 29 (2021): 3-34.

Gabriel, Iason. "Artificial intelligence, values, and alignment." Minds and Machines 30, no. 3 (2020): 411-437.

Jagadish, Hosagrahar V., Alberto O. Mendelzon, and Inderpal S. Mumick. "Managing conflicts between rules." In Proceedings of the Fifteenth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, pp. 192-201. 1996.

List, Alexandra, and Patricia A. Alexander. "Analyzing and integrating models of multiple text comprehension." Educational Psychologist 52, no. 3 (2017): 143-147.

Nay, John J. "Law informs code: A legal informatics approach to aligning artificial intelligence with humans." Northwestern Journal of Technology and Intellectual Property 20 (2022): 309.

Richter, Tobias, and Johanna Maier. "Comprehension of multiple documents with conflicting information: A two-step model of validation." Educational Psychologist 52, no. 3 (2017): 148-166.

Rodriguez-Soto, Manel, Marc Serramia, Maite Lopez-Sanchez, and Juan A. Rodriguez-Aguilar. "Instilling moral value alignment by means of multi-objective reinforcement learning." Ethics and Information Technology 24, no. 1 (2022): 9.

Wu, Qingyun, Gagan Bansal, Jieyu Zhang, Yiran Wu, Shaokun Zhang, Erkang Zhu, Beibin Li, Li Jiang, Xiaoyun Zhang, and Chi Wang. "AutoGen: Enabling next-gen LLM applications via multi-agent conversation framework." arXiv preprint arXiv:2308.08155 (2023).

Wu, Yiran, Tianwei Yue, Shaokun Zhang, Chi Wang, and Qingyun Wu. "StateFlow: Enhancing LLM task-solving through state-driven workflows." arXiv preprint arXiv:2403.11322 (2024).