v0.3.0 — Multi-Feature Fairness Auditing & Representation Diagnostics
TrustLens v0.3.0: The Multi-Feature Fairness & Representation Update
We are excited to announce the release of TrustLens v0.3.0! 🚀
This update marks a major milestone in our mission to make model reliability diagnostics more accessible and high-resolution. v0.3.0 introduces a powerful orchestration layer for fairness diagnostics, advanced latent space visualizations, and a new engine for comparative model auditing.
🌟 Highlights
⚖️ Multi-Feature Fairness Diagnostics
TrustLens now supports high-resolution fairness auditing across multiple sensitive features simultaneously. The TrustReport.plot_bias() API has been upgraded with an opt-in multi_feature mode that generates independent diagnostics for every demographic group in your dataset (e.g., Age, Gender, Ethnicity) in a single call.
- Per-Feature Figures: Return structured dictionaries of figures for seamless integration into reports.
- Mode Orchestration: Support for
"subgroup","equalized_odds", and"gap"modes across all features. - Deterministic Logic: Guaranteed stable feature ordering and consistent structure.
🌌 Deep Representation Analysis
Go beyond class-level metrics with our new representation diagnostic tools. We've introduced 2D embedding projections and separability scoring to help you visualize why your model might be struggling.
- 2D Embedding Visualization: Automatic UMAP/t-SNE/PCA projections with class-colored scatter plots.
- Separability Metrics: Silhouette scores and within/between-class distance analysis to quantify latent space quality.
- Automatic Fallbacks: Intelligent fallback logic ensures you always get a visualization, regardless of your environment's installed dependencies.
🤖 Model Comparison & Pattern Detection
Compare models head-to-head with the new trustlens.compare API. Identify "Calibration Drift" and "Confidently Wrong" patterns to surface high-level semantic risks that simple accuracy scores often hide.
🛠 What's New?
Added
- Multi-Feature Support:
TrustReport.plot_bias(multi_feature=True)for parallel feature analysis. - Embedding Projections:
plot_embedding_2dwith automatic dimensionality reduction. - New Metrics:
embedding_separabilityand enhancedequalized_odds()validation. - Comparative Audit:
trustlens.comparefor multi-model benchmarking. - Explainable Scores: Ranked explanation layer for Trust Score deductions.
Improved
- Deterministic Ordering: Canonical ordering for all bias and fairness visual results.
- Memory Hygiene: Automated figure cleanup in high-volume analysis pipelines.
- Rich Docstrings: Detailed return-shape matrices and usage examples for all primary APIs.
🤝 Contributors
A huge thank you to the community for making this release possible!
Special thanks to:
- @komoike-oss28-ui for the multi-feature visualization orchestration and fairness metric enhancements.
- @WeiGuang-2099 for the embedding visualization pipeline and representation metrics.
- @sidharth-vijayan for the bias analysis demonstrations.
- @MustansirNisar for security infrastructure.
Get Started
Update to the latest version via pip:
pip install trustlens --upgradeCheck out the updated Demo Notebook to see v0.3.0 in action!