{"id":19260865,"url":"https://github.com/mitre/arlin","last_synced_at":"2025-04-21T17:30:22.714Z","repository":{"id":206231221,"uuid":"716128986","full_name":"mitre/arlin","owner":"mitre","description":"ARLIN is a research library written in Python that provides explainability outputs and vulnerability detection for DRL models, specifically designed to increase model assurance and identify vulnerabilities and potential points of failure within a trained model. https://mitre.github.io/arlin/","archived":false,"fork":false,"pushed_at":"2024-02-06T13:53:16.000Z","size":13961,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-01T14:45:41.112Z","etag":null,"topics":["adversarial-machine-learning","explainable-ai","python","reinforcement-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-08T13:57:45.000Z","updated_at":"2024-12-19T16:15:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f1f7875-b738-44c2-8309-af278e9ffa71","html_url":"https://github.com/mitre/arlin","commit_stats":{"total_commits":121,"total_committers":1,"mean_commits":121.0,"dds":0.0,"last_synced_commit":"1ca7ffab664fb80dc0b0ea40cbec4851041d8822"},"previous_names":["mitre/arlin"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Farlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Farlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Farlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitre%2Farlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitre","download_url":"https://codeload.github.com/mitre/arlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250100093,"owners_count":21374866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adversarial-machine-learning","explainable-ai","python","reinforcement-learning"],"created_at":"2024-11-09T19:23:11.795Z","updated_at":"2025-04-21T17:30:21.624Z","avatar_url":"https://github.com/mitre.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ARLIN - Assured Reinforcement Learning Model Interrogation\n\nARLIN is a Python library that provides explainability outputs for trained Reinforcement\nLearning (RL) models that can be used to identify potential policy vulnerabilities and\ncritical points. Using XRL datasets, ARLIN provides detailed analysis into an RL model’s\nlatent space, creates a semi-aggregated Markov decision process (SAMDP) to outline the\nmodel’s path throughout an episode, and produces cluster analytics for each node within\nthe SAMDP to identify potential failure points and vulnerabilities within the model.\n\nDocumentation is available [here](https://mitre.github.io/arlin/).\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/readme_example.png\" /\u003e\n\u003c/p\u003e\n\n**Table of Contents**\n\n- [About ARLIN](#about-arlin)\n- [Main Features](#main-features)\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n- [License](#license)\n- [Citation](#citation)\n\n# About ARLIN\nThe ARLIN Toolkit is a research library written in Python that provides explainability\noutputs and vulnerability detection for Deep Reinforcement Learning (DRL) models,\nspecifically designed to increase model assurance and identify potential points of\nfailure within a trained model. ARLIN utilizes [matplotlib](https://matplotlib.org) and\n[networkx](https://networkx.org) to visualize a trained RL model’s decision making\nprocess and provide meaningful vulnerability identification and analysis to researchers.\nThe modular library is structured to easily support custom architecture, algorithm,\nframework, and analytics modifications and provides a well-documented and tested API for\nXRL research development and model assurance.\n\nKey functionalities of the ARLIN library include:\n- Creation of an XRL dataset with user-defined datapoints from a trained policy with the\nability to support custom data, algorithms, and model architectures.\n- Dimensionality reduction and embedding generation of a trained model's latent space.\n- Unsupervised clustering of policy latent space outputs based on policy transition data\nand available XRL attributes.\n- Analysis and visualization of policy latent space embeddings and clusters.\n- Semi-aggregated Markov decision process (SAMDP) generation and policy-specific path\nanalysis.\n\n# Main Features\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/arlin_structure.png\" /\u003e\n\u003c/p\u003e\n\nAt a high-level, ARLIN has 4 main components: `dataset`, `generation`, `analysis`, and\n`SAMDP`. The `dataset` component is used to create an XRL dataset from a trained model.\n`generation` uses the XRL dataset to create embeddings and clusters, which `analysis`\nprovides meaningful analysis and visualizations of. The cluster data and XRL dataset can\nalso be provided to `SAMDP` to generate and visualize different SAMDP graphs of the\nagent's policy along with available paths between given clusters.\n\n# Installation\n\n*Note: ARLIN has only been tested on Ubuntu 18.04 and Python 3.11.6\n\n1. **Clone the repository**\n\n    ```bash\n    git clone https://gitlab.mitre.org/advxai/arlin.git\n    ```\n\n2. **Setup Pyenv Virtual Environment**\n\n    ```bash\n    curl https://pyenv.run | bash\n    ```\n\n    ```bash\n    export PYENV_ROOT=\"$HOME/.pyenv\"\n    command -v pyenv \u003e/dev/null || export PATH=\"$PYENV_ROOT/bin:$PATH\"\n    eval \"$(pyenv init -)\"\n    ```\n\n    ```bash\n    pyenv install 3.11.6\n    pyenv local 3.11.6\n    ```\n\n3. **Install poetry**\n\n    ```bash\n    curl -sSL https://install.python-poetry.org | python3 -\n    ```\n\n    *Note: Don't forget to add `poetry` to your path.*\n    ```bash\n    export PATH=\"$HOME/.local/bin:$PATH\"\n    ```\n\n    ```bash\n    poetry config virtualenvs.in-project true\n    poetry env use 3.11.6\n    ```\n\n4. **Install required packages**\n\n    ```bash\n    cd arlin\n    poetry shell\n    poetry install --no-dev\n    ```\n\n    *Note: To re-enter the environment after this step, run `poetry shell`.*\n\n# Getting Started\n\nARLIN provides a number of example usage notebooks within the [examples](./examples/)\ndirectory. Documentation is available [here](https://mitre.github.io/arlin/).\n\n# License\n\nARLIN is released under the [Apache 2.0 license](LICENSE).\n\n# Citation\n\nIf you use `ARLIN` for your work, please cite the following BibTex entry.\n\n```BibTeX\n@misc{tapley2023arlin,\n  author =       {Alexander Tapley},\n  title =        {ARLIN},\n  howpublished = {\\url{https://github.com/mitre/arlin}},\n  year =         {2023}\n}\n```\n\nThis project contains content developed by The MITRE Corporation. If this code is used in\na deployment or embedded within another project, it is requested that you send an email\nto opensource@mitre.org in order to let us know where this software is being used.\n\nCopyright ©2023 The MITRE Corporation. ALL RIGHTS RESERVED. Approved for Public Release; Distribution Unlimited. Public Release Case Number 23-3585.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitre%2Farlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitre%2Farlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitre%2Farlin/lists"}