AI and Mathematicians Unite to Unlock the Universe's Hidden Patterns
This project demonstrates how AI techniques can discover hidden patterns in elliptic curves, illustrating key concepts from the Langlands program and recreating the essence of the murmuration discovery.
This implementation shows how machine learning can reveal "murmurations" - flowing, wave-like patterns that emerge when averaging properties of elliptic curves. These patterns were invisible to mathematicians for centuries until AI provided a new perspective.
- Generates Elliptic Curves: Creates a database of elliptic curves over finite fields
- Computes Frobenius Traces: Calculates the ap values that encode local information
- Applies Machine Learning: Uses PCA and neural networks to find patterns
- Reveals Murmurations: Visualizes the hidden oscillating patterns
- Demonstrates Langlands Connections: Shows how different mathematical objects relate
- Python 3.8 or higher
- 4GB RAM minimum (8GB recommended)
- Operating System: Windows, macOS, or Linux
# If you have git installed:
git clone https://github.com/alessoh/AI-Langlands.git
cd AI-Langlands
# Or download and extract the ZIP file, then navigate to the folder
# On Windows:
python -m venv venv
venv\Scripts\activate
# On macOS/Linux:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python verify_installation.py
You should see: "✓ All dependencies installed successfully!"
AI-Langlands/
│
├── README.md # This file
├── requirements.txt # Python dependencies
├── verify_installation.py # Installation verification script
│
├── murmuration_discovery.py # Main program
├── elliptic_curves.py # Elliptic curve computations
├── ml_patterns.py # Machine learning analysis
├── visualizations.py # Plotting and visualization
├── utils.py # Utility functions
│
├── data/ # Generated data (created automatically)
│ ├── curves.pkl
│ └── patterns.pkl
│
└── output/ # Results and visualizations (created automatically)
├── murmuration_patterns.png
├── pca_analysis.png
├── rank_predictions.png
└── report.txt
Run the main discovery program:
python murmuration_discovery.py
This will:
- Generate 10,000 elliptic curves
- Compute their properties
- Apply machine learning to find patterns
- Create visualizations in the
output/
folder - Generate a report summarizing the discoveries
For a larger analysis (requires more time and memory):
python murmuration_discovery.py --num-curves 50000 --max-prime 200
Parameters:
--num-curves
: Number of elliptic curves to analyze (default: 10000)--max-prime
: Maximum prime for computing traces (default: 100)--seed
: Random seed for reproducibility (default: 42)
This plot shows the averaged Frobenius traces for curves of different ranks. The flowing, oscillating patterns are the "murmurations" - statistical regularities that emerge only when viewing many curves together.
Principal Component Analysis reveals how curves cluster by rank in high-dimensional space. This visualization shows that machine learning can distinguish between curves of different ranks based on their local properties.
A confusion matrix showing how accurately the neural network predicts curve ranks from Frobenius traces. This demonstrates that global properties (rank) are encoded in local data (traces).
A detailed summary including:
- Statistics about the generated curves
- Machine learning accuracy metrics
- Mathematical insights discovered
- Connections to the Langlands program
Elliptic curves are equations of the form:
y² = x³ + ax + b
Over finite fields Fp, we can count solutions, giving us the trace:
ap = p + 1 - #E(Fp)
When we average ap values across many curves of the same rank and plot against p, beautiful oscillating patterns emerge. These patterns were invisible until AI provided the tools to analyze thousands of curves simultaneously.
The Langlands program predicts deep connections between:
- Galois representations (arithmetic side)
- Automorphic forms (analytic side)
Our discovery of murmurations provides evidence for these connections, showing that arithmetic properties (rank) create analytic patterns (oscillations).
-
ImportError: Make sure you've activated the virtual environment and run
pip install -r requirements.txt
-
Memory Error: Reduce the number of curves:
python murmuration_discovery.py --num-curves 5000
-
Slow Performance: The first run generates data which is cached. Subsequent runs will be much faster.
-
No Visualizations: Check that the
output/
directory was created and has write permissions.
- Check the generated
report.txt
for detailed diagnostics - Run with debug mode:
python murmuration_discovery.py --debug
- See the mathematical details in
docs/mathematical_background.pdf
-
Vary the Parameters: Try different numbers of curves and prime ranges. How do patterns change?
-
Modify the ML Model: Edit
ml_patterns.py
to try different neural network architectures. -
Explore Other Patterns: Can you find murmurations in other mathematical objects?
-
Statistical Analysis: Add more statistical tests to verify the significance of patterns.
Neural Networks (via TensorFlow/Keras) - A simple feedforward network.
Principal Component Analysis (PCA) - For dimensionality visualization Statistical Analysis - To discover the murmuration patterns through averaging
Pattern recognition through neural networks Unsupervised learning to find structure in data Statistical aggregation at scale
Helping mathematicians explore conjectures Translating between formal and informal mathematical language Suggesting proof strategies
We welcome contributions! Areas for expansion:
- Add more curve families
- Implement additional ML algorithms
- Create interactive visualizations
- Extend to higher genus curves
If you use this code for research, please cite:
Alesso, H.P. (2025). The AI Langlands Program. AI HIVE Publications.
GitHub: https://github.com/alessoh/AI-Langlands
MIT License - See LICENSE file for details.
This implementation is inspired by:
- The murmuration discovery by Alexey Pozdnyakov and Kyu-Hwan Lee
- Yang-Hui He's machine learning experiments
- The broader mathematical community working on the Langlands program
"The patterns were always there, waiting centuries for the right eyes to see them. AI gave us those eyes." - From The AI Langlands Program