Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add novelty rejection sampling feature #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
codelion merged 3 commits into algorithmicsuperintelligence:main from bluebread:novelty
Oct 10, 2025

Conversation

@bluebread
Copy link
Contributor

@bluebread bluebread commented Oct 10, 2025
edited
Loading

#277 Implemented novelty rejection sampling (as used in SakanaAI/ShinkaEvolve) and tested it on the function minimization example for 10 iterations. The combined score improved from 1.4975 -> 1.4995 (distance score 0.9950 -> 0.9995, value score unchanged). I’d appreciate any feedback or suggestions on this PR.

Changes

  • openevolve/database.py (+129 lines):
    • Added _is_novel() method with cosine similarity checking
    • Integrated LLM judge for programs exceeding similarity threshold
    • Per-island novelty tracking using embedding vectors (in Program class)
    • Modified ProgramDatabase.add() to reject non-novel programs
  • openevolve/config.py (+8 lines):
    • Added embedding_model, novelty_llm, and similarity_threshold config options
  • openevolve/controller.py (+1 line):
    • Integrated novelty LLM ensemble setup
  • examples/function_minimization/config.yaml (+3 lines):
    • Added novelty checking parameters

Test plan

  • All existing tests pass
  • Novelty feature debugged and working
  • Tested with function_minimization example

bluebread and others added 2 commits October 10, 2025 04:34
This commit introduces a novelty checking system that uses embeddings and LLM-based judging to ensure programs added to the database are meaningfully different from existing ones in their island.
Changes:
- Added EmbeddingClient class for computing code embeddings using OpenAI/Azure models
- Added novelty judge prompts for LLM-based similarity assessment
- Modified ProgramDatabase to support novelty checking before adding programs
- Added embedding vector field to Program dataclass
- Added configuration options for embedding model, novelty LLM, and similarity threshold
- Integrated novelty LLM ensemble in controller setup
- Updated example config with novelty checking parameters
The novelty check uses cosine similarity of embeddings as a first pass, then uses an LLM judge to determine if programs exceeding the similarity threshold are truly novel or just trivial variations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix novelty check in database.py to pass program.id instead of program object
- Fix missing self parameter in embedding.py _get_client_model method
- Fix serialization error by clearing novelty_llm before config deepcopy
- Update function_minimization config for testing with different models
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy link

CLAassistant commented Oct 10, 2025
edited
Loading

CLA assistant check
All committers have signed the CLA.

@codelion codelion merged commit 9df937a into algorithmicsuperintelligence:main Oct 10, 2025
3 checks passed
shubham3-ucb pushed a commit to mert-cemri/autoevolve that referenced this pull request Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /