legality
Distributed Legal Infrastructure for a Trustworthy Agentic Web
Chaffer, Tomer Jordi, Zhang, Victor Jiawei, Facchini, Sante Dino, Hu, Botao Amber, Rong, Helena, Guo, Zihan, Wang, Xisen, Santana, Carlos, De Gasperis, Giovanni
The agentic web marks a structural transition from a human-centered information network to a digital environment populated by artificial intelligence (AI) agents that perceive, decide, and act autonomously. As delegated action unfolds at machine speed, exceeds discrete moments of human judgment, and distributes decision-making across non-human actors, existing legal frameworks face growing strain, creating an urgent need for new mechanisms capable of sustaining legality in this emerging order. A trustworthy agentic web therefore depends on the infrastructuring of legality through interoperable protocols that organize identity, delegation, and accountability across systems, enabling coherent governance beyond isolated platforms. Towards this end, this article advances a distributed legal infrastructure (DLI), a governance paradigm composed of five interlocking layers: (1) self-sovereign, soulbound agent identities; (2) cognitive AI logic and constraint systems; (3) decentralized adjudication mechanisms for dispute resolution; (4) bottom-up agentic market regulation to mitigate information asymmetries and network effects, including insurance-based models; and (5) portable institutional frameworks that enable legal interoperability while preserving plural sources of authority. This reference framework contributes to emerging research on embedding legality within agentic web infrastructure, aligning distributed technical systems with accountability, contestability, and rule-of-law principles.
Regulating for AI Legitimacy
REGULATING FOR AI LEGITIMACY 1 Regulating for AI Legitimacy Gilad Abiri (forthcoming Cambridge Forum on AI Law and Governance) I. Introduction AI systems already govern. They rank speech and allocate attention; they filter applicants and triage claims; they recommend, flag, and withhold. This is likely only the prelude (Lazar, 2024). Technical improvements--what the field calls "alignment" --do not decide whether people will accept that governance. On the sociological view used here, legitimacy turns on recognition: whether power appears rule-bound, justified, and situated in institutions that speak for those it governs (Beetham, 1991; Weber, 1968). Recent experience with social media and search--forms of algorithmic power long before generative models-- shows the stakes. Distribution got faster and broader even as publics questioned authorization and reasons, producing recurrent social and political conflicts grounded in the question of who gets to set the rules for speech and attention (Abiri & Guidi, 2023; Cohen, 2017; Klonick, 2018; Suzor, 2019). As general-purpose AI embeds upstream of many domains, the risk is to repeat that drama at larger scale: systems that perform yet lack legitimacy, inviting resistance, regulatory backlash, and governance paralysis. Standard accounts of AI governance miss the legitimacy question in two ways. But publics do not simply ask whether outputs are accurate or efficient; they ask whether the power to decide is exercised rightfully--according to rules they recognize, for reasons they can follow, with avenues to challenge and repair (Beetham, 1991; Tyler, 2006). Second, where governance is REGULATING FOR AI LEGITIMACY 2 framed as rights compliance or product regulation, the sociological dimension of legitimacy--audience beliefs formed through visible authorship, intelligible reasons, and credible second looks--remains under-specified (Jasanoff, 2005; Post & Siegel, 2004). The result is a gap between technically careful systems and publics who resist, doubt, or disengage. The point is not that alignment and legitimacy are unrelated, but that it's perfectly possible to live in a world where a perfectly benevolent AI meets the political maelstrom of a full-blown legitimacy crisis. This matters normatively and practically: voluntary compliance, cooperation, and durable policy all depend on recognition, not just performance (Tyler, 2006; Post, 2012). The Article's contribution is to make legitimacy an explicit regulatory aim for AI.
Verifier-Guided Twelve-Tone Composition: A Generate-Verify-Repair Harness for Symbolic Music Generation
Dai, Congren, Zhao, Danni, Liu, Enyang, Yam, Michael Ching, Guo, Zhancheng, Gu, Siyi, Yang, Wentao, Dai, Bo, Li, Xiaobing, Sun, Maosong
Large language models can produce superficially legal twelve-tone scores that collapse into degenerate textures. We introduce a neuro-symbolic harness that wraps a language-model proposer in a generate-verify-repair-trace loop with symbolic verification. The complete pipeline improves event-local consistency without claiming whole-piece legality. Across 40 controlled tasks and four paired models, constraint-checked delivery rises from 13.3% under raw generation to 48.1% with the harness; it abstains on the remaining 51.9% of runs. The pass rate of a narrower collision and serialisation-consistency check rises from 33.5% to 58.3%, while degeneracy remains near 0.05, including under adversarial prompting. A blinded evaluation by five experts also shows a descriptive aggregate preference for harness candidates over raw generation in adherence, perceived legality, coherence, and overall quality.
Model Forensics: Investigating Whether Concerning Behavior Reflects Misalignment
Singh, Aditya, Kroiz, Gerson, Rajamanoharan, Senthooran, Nanda, Neel
A central goal of safety research is determining whether a model is misaligned. Prior work has largely focused on detecting concerning behavior. But behavior alone does not establish misalignment: a concerning action can arise from benign causes such as confusion. This motivates model forensics: investigating whether the action was driven by malign intent. In this paper, we propose a baseline protocol for model forensics consisting of two steps, iterated as needed. First, we read the chain of thought (CoT) to generate hypotheses about what drives model behavior. Second, we make edits to the prompt or environment to test these hypotheses. While the CoT is not always faithful, it is a rich source of unsupervised insight that can guide the collection of more rigorous evidence. To evaluate our protocol, we create a suite of six agentic environments where models exhibit concerning behavior, and apply it to each. We establish that Kimi K2 Thinking takes shortcuts due to a genuine disposition towards low-effort actions, by showing this hypothesis successfully predicts its behavior. Through counterfactual experiments, we show DeepSeek R1 deceives out of a desire to be consistent with a previous instance of itself. Our methods nonetheless leave significant room for refinement. For example, when we test whether Kimi K2 Thinking believes it is violating user intent, we find no evidence of such a belief, but without positive controls we cannot confirm our tests would detect it. Overall, we find our simple protocol provides a strong baseline that we hope future work will improve upon. More broadly, our work is a concrete step in developing the growing field of model forensics.
A Deep Learning Model for Predicting Transformation Legality
Tiwari, Avani, Hakimi, Yacine, Baghdadi, Riyadh
Compilers must check the legality of code transformations to guarantee the correctness of applying a sequence of code transformations to a given code. While such a legality check needs to be precisely computed in general, we can use an approximate legality prediction model in certain cases, such as training a reinforcement learning (RL) agent for schedule prediction. In this paper, we propose an approximate method for legality checks. We propose a novel DL model for predicting the legality of transformations. The model takes the code representation and a list of transformations as input and predicts whether applying those transformations to the code is legal. We implement and evaluate the proposed model, demonstrating its effectiveness. Our evaluation shows an F1 score of 0.91 on a test set of randomly generated programs. To further evaluate the model in a practical scenario, we used the model to replace the legality check used during the training of an RL agent designed for automatic code optimization. We demonstrate that such a replacement enables the agent to train on twice as many steps, resulting in faster training and reducing resource usage by approximately 80\% for CPU and 35\% for RAM. The agent trained using this approach maintains comparable performance, with only a 4\% reduction on benchmarks from the Polybench suite compared to the traditional method.
Disentangling AI Alignment: A Structured Taxonomy Beyond Safety and Ethics
Recent advances in AI research make it increasingly plausible that artificial agents with consequential real-world impact will soon operate beyond tightly controlled environments. Ensuring that these agents are not only safe but that they adhere to broader normative expectations is thus an urgent interdisciplinary challenge. Multiple fields -- notably AI Safety, AI Alignment, and Machine Ethics -- claim to contribute to this task. However, the conceptual boundaries and interrelations among these domains remain vague, leaving researchers without clear guidance in positioning their work. To address this meta-challenge, we develop a structured conceptual framework for understanding AI alignment. Rather than focusing solely on alignment goals, we introduce a taxonomy distinguishing the alignment aim (safety, ethicality, legality, etc.), scope (outcome vs. execution), and constituency (individual vs. collective). This structural approach reveals multiple legitimate alignment configurations, providing a foundation for practical and philosophical integration across domains, and clarifying what it might mean for an agent to be aligned all-things-considered.
Traffic Regulation-aware Path Planning with Regulation Databases and Vision-Language Models
Han, Xu, Wu, Zhiwen, Xia, Xin, Ma, Jiaqi
This paper introduces and tests a framework integrating traffic regulation compliance into automated driving systems (ADS). The framework enables ADS to follow traffic laws and make informed decisions based on the driving environment. Using RGB camera inputs and a vision-language model (VLM), the system generates descriptive text to support a regulation-aware decision-making process, ensuring legal and safe driving practices. This information is combined with a machine-readable ADS regulation database to guide future driving plans within legal constraints. Key features include: 1) a regulation database supporting ADS decision-making, 2) an automated process using sensor input for regulation-aware path planning, and 3) validation in both simulated and real-world environments. Particularly, the real-world vehicle tests not only assess the framework's performance but also evaluate the potential and challenges of VLMs to solve complex driving problems by integrating detection, reasoning, and planning. This work enhances the legality, safety, and public trust in ADS, representing a significant step forward in the field.
Compliance of AI Systems
Schöning, Julius, Kruse, Niklas
The increasing integration of artificial intelligence (AI) systems in various fields requires solid concepts to ensure compliance with upcoming legislation. This paper systematically examines the compliance of AI systems with relevant legislation, focusing on the EU's AI Act and the compliance of data sets. The analysis highlighted many challenges associated with edge devices, which are increasingly being used to deploy AI applications closer and closer to the data sources. Such devices often face unique issues due to their decentralized nature and limited computing resources for implementing sophisticated compliance mechanisms. By analyzing AI implementations, the paper identifies challenges and proposes the first best practices for legal compliance when developing, deploying, and running AI. The importance of data set compliance is highlighted as a cornerstone for ensuring the trustworthiness, transparency, and explainability of AI systems, which must be aligned with ethical standards set forth in regulatory frameworks such as the AI Act. The insights gained should contribute to the ongoing discourse on the responsible development and deployment of embedded AI systems.
Tadashi: Enabling AI-Based Automated Code Generation With Guaranteed Correctness
Vatai, Emil, Drozd, Aleksandr, Ivanov, Ivan R., Ren, Yinghao, Wahib, Mohamed
Frameworks and DSLs auto-generating code have traditionally relied on human experts developing them to have in place rigorous methods to assure the legality of the applied code transformations. Machine Learning (ML) is gaining wider adoption as a means to auto-generate code optimised for the hardware target. However, ML solutions, and in particular black-box DNNs, provide no such guarantees on legality. In this paper we propose a library, Tadashi, which leverages the polyhedral model to empower researchers seeking to curate datasets crucial for applying ML in code-generation. Tadashi provides the ability to reliably and practically check the legality of candidate transformations on polyhedral schedules applied on a baseline reference code. We provide a proof that our library guarantees the legality of generated transformations, and demonstrate its lightweight practical cost. Tadashi is available at https://github.com/vatai/tadashi/.