<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by hamees on Medium]]></title>
        <description><![CDATA[Stories by hamees on Medium]]></description>
        <link>https://medium.com/@hameessayed71?source=rss-d0c33f2c6348------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5QtIf-b2KTuRbNxq4QTDBQ.jpeg</url>
            <title>Stories by hamees on Medium</title>
            <link>https://medium.com/@hameessayed71?source=rss-d0c33f2c6348------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 23:24:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hameessayed71/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[places on the internet I think are awesome]]></title>
            <link>https://medium.com/@hameessayed71/places-on-the-internet-i-think-are-awesome-af442120571c?source=rss-d0c33f2c6348------2</link>
            <guid isPermaLink="false">https://medium.com/p/af442120571c</guid>
            <dc:creator><![CDATA[hamees]]></dc:creator>
            <pubDate>Wed, 24 Sep 2025 19:31:01 GMT</pubDate>
            <atom:updated>2025-09-24T19:31:01.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*aN5Q1OpL0vv_15O6.jpg" /></figure><p><a href="http://incompleteideas.net/">Incomplete Ideas — Dr. Richard Sutton</a> <br><a href="https://ai-2027.com/">AI 2027</a><br><a href="https://publicdomainreview.org/">Review of the Internet</a><br><a href="https://arnicas.substack.com/">Things I think are awesome<br></a><a href="https://transformer-circuits.pub/">Transformer Circuits — Anthropic’s Interpretability Research</a><br><a href="https://gwern.net/">Gwern.net</a><br><a href="https://textfiles.meulie.net/russian/cyberlib.narod.ru/lib/critica/sing/singstar.html">Staring into the singularity</a><br><a href="https://distill.pub/">Distill.pub</a><br><a href="https://www.cold-takes.com/">Cold Takes</a><br><a href="https://geohot.github.io/blog">Singularity is nearer — George Hotz<br></a><a href="https://thoughtforms.life/">Forms of life, forms of mind — Dr. Michael Levin</a><br><a href="https://www.scientificamerican.com/author/martin-gardner">Recreational Mathematics — Martin Gardner</a><br><a href="https://www.lesswrong.com/">Less Wrong</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af442120571c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulating Gravitational Lensing with Flow Matching: GSoC Midterm Update]]></title>
            <link>https://medium.com/@hameessayed71/simulating-gravitational-lensing-with-flow-matching-gsoc-midterm-update-7d4692375ae8?source=rss-d0c33f2c6348------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d4692375ae8</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[gsoc]]></category>
            <category><![CDATA[space]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[diffusion-models]]></category>
            <dc:creator><![CDATA[hamees]]></dc:creator>
            <pubDate>Sat, 02 Aug 2025 21:13:01 GMT</pubDate>
            <atom:updated>2025-08-03T07:06:06.127Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding Gravitational Lensing</h3><p>Gravitational lensing is a direct prediction of Einstein’s General Theory of Relativity. In essence, the gravity of a massive object, such as a galaxy or a cluster of galaxies, is so immense that it warps the fabric of spacetime itself. When light from a more distant object passes through this warped region, its path is bent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zos6XFs95CP6K1sp" /></figure><p>This “cosmic lens” can magnify, distort, and even create multiple images of the background source. For scientists, this effect is an invaluable tool. It allows them to study the distribution of mass in the universe, providing one of the only methods we have to map the presence of invisible dark matter.</p><h3>The Challenge: A Computational and Data Bottleneck</h3><p>To test various cosmological theories, scientists need to compare observations with simulations. The traditional method for simulating gravitational lensing involves <strong>ray tracing, </strong>a computationally intensive process that models the entire distribution of light rays. This leads to two major bottlenecks:</p><ul><li><strong>Computational Cost:</strong> Ray tracing is extremely slow. This limits the number of theories or experiments we can run in a reasonable timeframe.</li><li><strong>Data Scarcity:</strong> Because generating each simulation is so expensive, creating the large, diverse datasets required to train other machine learning models (like classifiers for detecting anomalies) is often impractical.</li></ul><p>These limitations slow down scientific progress. My solution is to replace this direct calculation with a highly efficient generative model.</p><h4>The Solution: Simulating with Generative Flows</h4><p>My Google Summer of Code project with ML4SCI addresses these challenges by using deep generative models to learn the physics of lensing and produce simulations almost instantaneously. The core of this work is a technique called <strong>Flow Matching</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_rhbRFxUG0Lnzlk0" /></figure><p>Instead of relying on direct calculation, a Flow Matching model learns the continuous transformation that morphs a simple distribution of random noise into the complex, structured distribution of real lensing images. It effectively learns a “velocity field” that defines the precise path from noise to data. Once this transformation is learned, the model can generate new, physically consistent simulations by starting with a new random sample and guiding it along this learned path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*MgYlqXY3agy_qoqiYKJj0Q.gif" /><figcaption>Visualization of Sampling process</figcaption></figure><p>To make this tool useful for physicists, I developed two conditional versions of the model:</p><ol><li><strong>Class-Conditioned:</strong> Generates simulations corresponding to discrete physical categories (e.g., different types of dark matter substructure).</li><li><strong>Variable-Conditioned:</strong> Generates simulations based on specific, continuous physical parameters (e.g., the mass and density profile of the lens).</li></ol><h3>Evals: Visual Fidelity of Generated Samples</h3><p>First, I confirmed that the model produces visually realistic images that are consistent with their conditioning.</p><p><strong>Class-Conditioned Samples:</strong> The model correctly generates visually distinct images for different dark matter classes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5latZ4Ce_8PQp1csuADrA.png" /></figure><p><strong>Variable-Conditioned Samples:</strong> The model demonstrates precise control, producing a smooth transition in the lensed image as a physical variable is changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bS3apKTINRIgZXyCVZUmUg.png" /><figcaption>Top row is Real Images and bottom is Generated</figcaption></figure><h3>Quantitative Metrics</h3><p>I rigorously evaluated the model’s output against the ground-truth simulations using a suite of standard metrics. The results demonstrate the model’s high fidelity and accuracy, with the FID score of <strong>1.614</strong> indicating an exceptionally high degree of realism.</p><pre>╔════════╦════════╦═══════╦════════╦═══════╦═══════╗<br>║  MAE   ║  MSE   ║ PSNR  ║  SSIM  ║  FID  ║ CMMD  ║<br>╠════════╬════════╬═══════╬════════╬═══════╬═══════╣<br>║ 0.0302 ║ 0.0108 ║ 68.68 ║ 0.9993 ║ 1.614 ║ 0.401 ║<br>╚════════╩════════╩═══════╩════════╩═══════╩═══════╝</pre><h3>Physics-Based Validation</h3><p>Finally, I verified that the generated images contain accurate physical information. I trained two independent models : a classifier and a regressor, to analyse the generated images.</p><ul><li>The <strong>classifier</strong> was able to identify the correct physical class from the images with perfect (1.00 AUC) accuracy.</li><li>The <strong>regressor</strong> was able to accurately predict the continuous physical parameters that were used to generate the images.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kh6WxL02uQu8jLTL3m4OLg.png" /></figure><p>These tests confirm that the model is not just creating pretty pictures, but is generating scientifically valid data.</p><h3>Future Work and Conclusion</h3><p>This project has successfully demonstrated that deep generative models can overcome the critical bottlenecks of computational cost and data scarcity in cosmological simulation. The results from this first phase are extremely promising.</p><p>For the next phase, I will advance this work by creating a truly <strong>physics-aware</strong> model. Instead of only learning from the data, I will integrate the fundamental equations of gravitational lensing directly into the model’s training objective. This means the model will be explicitly penalised if its generated images violate known physical laws.</p><p>This ensures the output is not just statistically likely, but is guaranteed to be physically consistent by its very design. By creating a fast, accurate, and now physics-aware simulator, this work can provide a powerful tool for the scientific community, enabling rapid hypothesis testing and paving the way for new discoveries in the study of dark matter and the fundamental structure of our universe.</p><p>Code for this project is available on this <a href="https://github.com/ML4SCI/DeepLense/tree/main/DeepLense_Diffusion_Hamees">GitHub link</a> and is being updated regularly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d4692375ae8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>