Skip to content

About

Reference components for adjoint-induced retrieval experiments.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Chiral AIR Reference Components

This repository provides a lightweight reference implementation for the main interfaces used in adjoint-induced retrieval (AIR) experiments:

  • retrieval operators for identity, Householder, and linear AIR readouts;
  • cosine top-k and MRR retrieval metrics;
  • JSONL data schema validation;
  • a CPU-friendly toy inverse-retrieval sanity check.

The goal of this release is to make the method components and evaluation protocol easy to inspect, run, and adapt. Large model weights, checkpoints, and full-scale datasets are not bundled in this repository.

Installation

python -m venv .venv
source .venv/bin/activate
pip install -e .

On Windows PowerShell:

py -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .

Quick Start

Run a small synthetic inverse-retrieval sanity check:

python scripts/run_toy_air.py --operator linear --epochs 200

Validate the example JSONL schema:

python scripts/validate_schema.py examples/toy_inverse.jsonl

Repository Layout

chiral_air/
  data.py        JSONL loading and schema validation.
  metrics.py     top-k and MRR retrieval metrics.
  operators.py   identity, Householder, and linear readout operators.
  toy.py         synthetic inverse-retrieval data generator.
scripts/
  run_toy_air.py
  validate_schema.py
docs/
  data_schema.md
  artifact_scope.md
examples/
  toy_inverse.jsonl

Citation

If this code is useful for your work, please cite the associated ICML paper:

@inproceedings{du2026chiral,
  title = {Chiral Symmetry Breaking in Transformers: A Group-Equivariant Framework for Solving the Reversal Curse via Adjoint Manifold Mappings},
  author = {Du, Hanji},
  booktitle = {Proceedings of the International Conference on Machine Learning},
  year = {2026}
}

Code Availability Wording

For papers or project pages, a concise description of this release is provided in docs/code_availability_statement.md.

About

Reference components for adjoint-induced retrieval experiments.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages