<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://eren-cetin.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://eren-cetin.github.io/" rel="alternate" type="text/html" /><updated>2026-10-10T20:11:45+03:00</updated><id>https://eren-cetin.github.io/feed.xml</id><title type="html">Eren Çetin</title><subtitle>PhD Student at ETH Zürich</subtitle><author><name>Eren Çetin</name><email>ecetin@student.ethz.ch</email></author><entry><title type="html">3D Earth Visualization with Three.js and Google Earth Engine</title><link href="https://eren-cetin.github.io/posts/2025-10-09-earth-visualization/" rel="alternate" type="text/html" title="3D Earth Visualization with Three.js and Google Earth Engine" /><published>2025-10-09T00:00:00+03:00</published><updated>2025-10-09T00:00:00+03:00</updated><id>https://eren-cetin.github.io/posts/earth-visualization</id><content type="html" xml:base="https://eren-cetin.github.io/posts/2025-10-09-earth-visualization/"><![CDATA[<h2 id="try-it-live">Try It Live</h2>

<div style="text-align: center; margin: 20px 0;">
  <iframe src="/assets/demos/earth-visualize/index.html" width="100%" height="500px" style="border: 1px solid #ccc; border-radius: 8px;" frameborder="0">
    Your browser does not support iframes.
    <a href="/assets/demos/earth-visualize/index.html" target="_blank">Open demo in new window</a>
  </iframe>
</div>

<div style="text-align: center; margin: 10px 0;">
  <a href="/assets/demos/earth-visualize/index.html" target="_blank" style="display: inline-block; padding: 10px 20px; background-color: #007cba; color: white; text-decoration: none; border-radius: 5px;">🚀 Open Full Screen Demo</a>
</div>

<h2 id="steps-to-reproduce">Steps to reproduce</h2>

<h3 id="1-set-up-the-earth-visualization">1. Set up the earth visualization</h3>

<h3 id="2-set-up-the-google-earth-engine-api-for-self-use">2. Set up the Google Earth Engine API for self-use</h3>

<h3 id="3-deploy-the-demo-on-cloudflare-workers">3. Deploy the demo on Cloudflare Workers</h3>

<h2 id="thanks-to">Thanks to…</h2>

<ul>
  <li><a href="https://threejs.org/">Three.js</a> - A powerful 3D library for rendering and
animating 3D graphics in the browser.</li>
  <li><a href="https://github.com/vasturiano/three-globe">Three-Globe</a> - A very nice 3D
globe visualization library built on top of Three.js.</li>
  <li><a href="https://earthengine.google.com/">Google Earth Engine</a> - A platform for
planetary-scale environmental data analysis, it is free for academic and
non-commercial use.</li>
  <li><a href="https://workers.cloudflare.com/">Cloudflare Workers</a> - A serverless platform
that allows you to run JavaScript code at the edge of Cloudflare’s global
network.</li>
</ul>]]></content><author><name>Eren Çetin</name><email>ecetin@student.ethz.ch</email></author><summary type="html"><![CDATA[Interactive Earth Engine playground for informative visualization of environmental details over years based on actual earth observation data.]]></summary></entry><entry><title type="html">Recap: World Models Evolution and JEPA</title><link href="https://eren-cetin.github.io/posts/2025-10-08-recap-on-world-models-evolution/" rel="alternate" type="text/html" title="Recap: World Models Evolution and JEPA" /><published>2025-10-08T00:00:00+03:00</published><updated>2025-10-08T00:00:00+03:00</updated><id>https://eren-cetin.github.io/posts/recap-on-world-models-evolution</id><content type="html" xml:base="https://eren-cetin.github.io/posts/2025-10-08-recap-on-world-models-evolution/"><![CDATA[<p>The recent buzz around models like Google’s Genie has thrust “world models” into
the spotlight, creating a wave of excitement. But what are they, and is the hype
justified? At their core, world models are an attempt to build systems that
learn the fundamental dynamics of our world—a sort of intuitive physics engine
learned from data. The goal is to move beyond language and images to truly
understanding how things move, interact, and evolve over time.</p>

<p>This is a monumental step, but the path is filled with massive hurdles that
temper expectations. Let’s break down the landscape, from the core challenges to
the elegant architectural solutions that are paving the way forward.</p>

<h1 id="the-big-hurdles-data-and-action">The Big Hurdles: Data and Action</h1>

<p>Training effective world models is far more complex than training a language
model. The challenges aren’t just about scale; they are fundamental to what
we’re asking these models to do.</p>

<h2 id="the-scarcity-of-the-right-data">The Scarcity of the <em>Right</em> Data</h2>

<p>While we are swimming in a sea of video data, world models need something very
specific: videos paired with actions. To truly learn cause and effect, a model
needs to know not just what happened next, but why. What action did an agent
take to cause the next frame? For a self-driving car, this could be the steering
angle and throttle; for a robot arm, the joint torques. Without this action
data, a model might become excellent at predicting the next frame of a passive
video, but it will struggle to be a reliable tool for an active agent that needs
to plan and control its movements.</p>

<h2 id="the-heterogeneity-of-action-spaces">The <em>Heterogeneity</em> of Action Spaces</h2>

<p>A more profound challenge is the sheer diversity of “action spaces.” For Large
Language Models (LLMs), the “action” is simple and unified: predicting the next
token. But for physical agents, actions are intrinsically tied to their bodies.
A drone’s actions (rotor speeds) are entirely different from a humanoid robot’s
(joint movements) or a car’s (steering, acceleration). This makes creating a
single, universal world model that works across different agents a monumental
task. How can one model learn the physics relevant to both a flying drone and a
walking robot? This heterogeneity is a significant barrier to the dream of a
general-purpose world model.</p>

<h2 id="two-paths-to-building-the-world-models-pixel--vs-latent-space">Two Paths to Building the World Models: Pixel- vs. Latent-Space</h2>

<p>As researchers tackle these challenges, two main architectural philosophies have
emerged for how a model should represent and predict the future.</p>

<h3 id="the-pixel-space-approach">The Pixel-space Approach</h3>

<p>The most intuitive approach is to predict the future pixel by pixel. Given the
current frame and an action, the model generates the entire next video frame.
Early models took this path, aiming for high-fidelity, photorealistic
predictions of every detail.</p>

<p>However, this method is computationally ravenous. Why? Because most pixels in a
scene are irrelevant for understanding the core dynamics. Does a self-driving
car need to predict the exact motion of every leaf on a tree to know it should
stop at a red light? This obsession with pixel-level detail makes the models
incredibly expensive to train and slow to run, as the compute required scales
enormously with both spatial and temporal resolution.</p>

<h3 id="the-efficient-abstraction-latent-space-models">The Efficient Abstraction: Latent-space Models</h3>

<p>This brings us to the second, more efficient approach: latent-space models. The
guiding principle here is simple: why predict every pixel when you can predict
an abstract summary of the future? This is the core idea behind the
Joint-Embedding Predictive Architecture
(<a href="https://arxiv.org/abs/2301.08243">JEPA</a>) championed by Meta AI.</p>

<p>Instead of operating on raw pixels, a JEPA model first learns a compressed,
abstract representation—or “embedding”—of the world. It then performs all its
predictions within this highly efficient latent space. The goal is not to
reconstruct the exact image but to predict the future representation. This
approach cleverly sidesteps the need to model unnecessary details like lighting,
textures, and background noise, focusing only on the semantic essence of the
scene.</p>

<h3 id="jepa-in-action-the-dino-world-case-study">JEPA in Action: The <a href="https://arxiv.org/pdf/2507.19468">DINO-World Case Study</a></h3>

<figure class="figure-centered">
  <img src="/assets/blogs/recap-on-world-models/back-to-features-dino.png" alt="DINO-World schematic. It shows video frames being fed into a frozen DINOv2 encoder to get 'Past Features.' Then, the 'Predictor' module takes these features to generate 'Predicted Features,' which are compared to the future ground-truth DINOv2 features." title="The main architectural diagram for DINO-world. It shows video frames being fed into a frozen DINOv2 encoder to get &quot;Past Features.&quot; Then, the &quot;Predictor&quot; module takes these features to generate &quot;Predicted Features,&quot; which are compared to the future ground-truth DINOv2 features." />
  <figcaption>The main architectural diagram for DINO-world. It shows video frames being fed into a frozen DINOv2 encoder to get "Past Features." Then, the "Predictor" module takes these features to generate "Predicted Features," which are compared to the future ground-truth DINOv2 features.</figcaption>
</figure>

<p>The DINO-world model is a fantastic demonstration of the power of latent-space
prediction and highlights a brilliant strategy: <strong>decoupling</strong>. The authors
asked: why force one giant model to learn both visual understanding <em>and</em>
physical dynamics simultaneously?</p>

<p>Instead, they took a two-step approach:</p>

<ol>
  <li>
    <p><strong>Leverage a Pre-trained Vision Expert</strong>: They start with the frozen visual
features from DINOv2, a powerful model already trained to understand the
visual world. DINOv2 provides a rich, compressed representation that already
captures concepts like objects, depth, and scene layout.</p>
  </li>
  <li>
    <p><strong>Train a Dynamics Predictor</strong>: They then train a separate, smaller predictor
model that operates exclusively on these abstract DINOv2 features. Its job is
not to predict pixels, but to predict what the DINOv2 features of the next
frame will look like.</p>
  </li>
</ol>

<p>This decoupling provides a massive boost in efficiency. While a pixel-space
model like COSMOS can require 4 to 12 billion parameters, the DINO-world
predictor achieves strong results with just over 1 billion.</p>

<p>Critically, this approach works remarkably well. DINO-world demonstrates a solid
grasp of intuitive physics and excels at downstream tasks like predicting future
object segmentation masks and depth maps—all while operating in its efficient,
abstract latent space. This validates the core idea that a compressed
representation is sufficient for learning the essential dynamics of the world.
Rest of the research seems to be converging: 1) Take a strong video model
architecture, 2) Plug-in action conditioning modules, 3) Often use something
like Diffusion Forcing to refine the predictions but the core engine remains to
operate in this very efficient latent space.</p>

<figure class="figure-centered">
  <img src="/assets/blogs/recap-on-world-models/back-to-features-results.png" alt="DINO-World autoregressive rollout results. This figure shows two examples of autoregressive rollouts. The top row is the real video, the middle row is the visualization of the *ground-truth* DINOv2 features, and the bottom row shows DINO-world's predicted features over time." title="DINO-World autoregressive rollout results. This figure shows two examples of autoregressive rollouts. The top row is the real video, the middle row is the visualization of the *ground-truth* DINOv2 features, and the bottom row shows DINO-world's predicted features over time." />
  <figcaption>DINO-World autoregressive rollout results. This figure shows two examples of autoregressive rollouts. The top row is the real video, the middle row is the visualization of the *ground-truth* DINOv2 features, and the bottom row shows DINO-world's predicted features over time. It shows that the predicted latent features closely track the real ones, correctly anticipating the movement of the taxi and the parabolic motion of the objects. It makes the abstract idea of "predicting features" tangible and proves its effectiveness. The visualization of features via PCA makes them easy to interpret visually.</figcaption>
</figure>

<figure class="figure-centered">
  <img src="/assets/blogs/recap-on-world-models/back-to-features-cross-attn-qualitative.png" alt="This figure visualizes the cross-attention maps inside the predictor. For a specific query patch in the future (marked in red), it shows which patches from the past frames the model is *paying attention to*." title="A peek inside DINO-world's 'brain'. To predict a future patch (red dot), the model's attention (bright areas) focuses on the object's previous locations, showing how it tracks motion over time to understand physical dynamics." />
  <figcaption>A peek inside DINO-world's 'brain'. To predict a future patch (red dot), the model's attention (bright areas) focuses on the object's previous locations, showing how it tracks motion over time to understand physical dynamic.s</figcaption>
</figure>

<h1 id="bottom-line-the-future-of-world-models">Bottom Line: The Future of World Models</h1>

<p>The takeaway is clear: the frontier of world models is rapidly shifting. We are
moving away from brute-force, pixel-perfect predictions and toward the elegant
efficiency of latent-space models. This JEPA-inspired approach allows for
building more scalable and capable models that learn the essential dynamics of
our world. But what does this mean in practice, and what challenges remain?</p>

<h2 id="world-models-as-flexible-simulators-not-a-replacement-for-real-data">World Models as Flexible Simulators, Not a Replacement for Real Data</h2>

<p>So, what is the actual impact for building smarter robots and AI agents? The
most immediate role for world models is as powerful, flexible simulators. Unlike
traditional simulators like MuJoCo or IsaacSim, which are based on hard-coded
physics equations, world models learn dynamics directly from real-world video
data. This allows them to capture complex, nuanced phenomena that are difficult
to model mathematically.</p>

<p>However, they are not a silver bullet that will eliminate the need for
real-world data. For high-precision, safety-critical tasks, traditional
physics-based simulators remain more reliable. World models are not perfect, and
their predictions can degrade over longer time horizons. The future likely
involves a hybrid approach, where agents train on a mix of real-world
demonstrations, traditional simulation, and imagined scenarios from a world
model <a href="https://arxiv.org/pdf/2507.19468">3</a>.</p>

<h2 id="supporting-the-next-generation-of-ai-agents">Supporting the Next Generation of AI Agents</h2>

<p>Perhaps the most exciting role for world models is not as the policy engine
itself, but as a critical advisor to one. Think of a generalist agent model
(like a VLA) that needs to decide what to do next. Instead of acting blindly, it
can use a world model as a short-term “consequence simulator.” The agent can
“imagine” the outcome of a few different actions in the world model’s latent
space and choose the one that leads to the most desirable future. In this
vision, the world model isn’t the decision-maker; it’s the high-speed
imagination that enables better, safer decisions.</p>

<h3 id="the-road-ahead-big-unsolved-problems">The Road Ahead: Big Unsolved Problems</h3>

<p>Despite the rapid progress, several major challenges stand between us and truly
general-purpose world models:</p>

<ol>
  <li>
    <p><strong>Long-Term Consistency</strong>: While current models can generate consistent short
video clips, their predictions tend to drift and lose coherence over longer
sequences. Solving this will likely require new architectures, such as
state-space models or retrieval-augmented methods, to maintain a coherent
history.</p>
  </li>
  <li>
    <p><strong>Integrating Abstract Reasoning</strong>: World models are learning the intuitive
“how” of the physical world. However, the abstract “what” and “why”—common
sense reasoning—is still the domain of LLMs. A deeper fusion of these two
capabilities is needed for models to truly understand and plan complex tasks.</p>
  </li>
  <li>
    <p><strong>Real-Time Performance</strong>: For a world model to be useful for an interactive
agent, it needs to run in real-time. This remains a significant engineering
hurdle, especially for large models that need to run on edge devices like
robots.</p>
  </li>
  <li>
    <p><strong>Multi-Agent Dynamics</strong>: The real world is inherently multi-agent. Modeling
the complex interactions, intentions, and social dynamics between multiple
independent agents is a massive open problem that single-agent models do not
address.</p>
  </li>
</ol>

<h2 id="citation">Citation</h2>

<ol>
  <li><a href="https://arxiv.org/abs/2301.08243">Assran, M., Duval, Q., Misra, I., Bojanowski, P., Vincent, P., Rabbat, M., … &amp; Ballas, N. (2023). Self-supervised learning from images with a joint-embedding predictive architecture</a></li>
  <li><a href="https://knightnemo.github.io/blog/posts/wm_2025/">Huang, Siqiao. “Beyond the Hype: How I See World Models Evolving in 2025”. Nemo’s Blog (Oct 2025)</a>.</li>
  <li><a href="https://arxiv.org/pdf/2507.19468">Baldassarre, F., Szafraniec, M., Terver, B., Khalidov, V., Massa, F., LeCun, Y., … &amp; Bojanowski, P. (2025). Back to the features: Dino as a foundation for video world models</a></li>
</ol>]]></content><author><name>Eren Çetin</name><email>ecetin@student.ethz.ch</email></author><summary type="html"><![CDATA[Is the hype around world models grounded? What does JEPA suggest? My take-aways based on the blog post of [World Models Evolution: Beyond the Hype 2025](https://knightnemo.github.io/blog/posts/wm_2025/#fn:11) and [Back to the Features: DINO as a Foundation for Video World Models](https://arxiv.org/pdf/2507.19468)]]></summary></entry><entry><title type="html">Recap: LoRA Without Regret</title><link href="https://eren-cetin.github.io/posts/2025-10-07-recap-on-lora-without-regret/" rel="alternate" type="text/html" title="Recap: LoRA Without Regret" /><published>2025-10-07T00:00:00+03:00</published><updated>2025-10-07T00:00:00+03:00</updated><id>https://eren-cetin.github.io/posts/recap-on-lora-without-regret</id><content type="html" xml:base="https://eren-cetin.github.io/posts/2025-10-07-recap-on-lora-without-regret/"><![CDATA[<p>Large language models keep getting bigger, yet most of the time we only need to
specialize them to a narrow task: a compliance assistant, a creative writing
sidekick, or a research helper in a post-training stage. Full finetuning every
weight in a 7B or 70B parameter model is expensive and awkward to deploy, which
is why Low Rank Adaptation (LoRA) has become such a popular alternative. LoRA
proposes a simple idea: instead of touching the full weight matrices in the base
model, learn a pair of tiny matrices whose product approximates the change we
want. The base weights stay frozen, the adapters are small enough to ship around
in megabytes, and we get most of the accuracy of a full-blown finetune.</p>

<p>This post is my distilled set of notes from Thinking Machines’ <em>LoRA without
Regret</em> write-up. Their experiments dig into when LoRA behaves like full
finetuning, where it breaks, and why it may be the default choice for many
post-training pipelines.</p>

<h2 id="lora-in-a-nutshell">LoRA in a Nutshell</h2>

<figure class="figure-centered">
  <img src="/assets/blogs/recap-on-lora/lora_toy.svg" alt="Placeholder for LoRA adapter visualization" title="Schematic visualization of LoRA adapters spanning a low-rank subspace of the weight matrix via matrix A and B." />
  <figcaption>Schematic visualization of LoRA adapters spanning a low-rank subspace of the weight matrix via matrix A and B.</figcaption>
</figure>

<p>LoRA inserts low-rank adapter matrices <code class="language-plaintext highlighter-rouge">A</code> and <code class="language-plaintext highlighter-rouge">B</code> alongside the original model
weights. Because their rank is tiny, we only introduce a small number of new
parameters (often around $1\%$ of the number of base model parameters). During
training we backpropagate through the frozen base model but only update the
adapter weights, effectively capturing task-specific information in a
low-dimensional subspace.</p>

<p>When the base weight matrix $W \in \mathbb{R}^{d \times k}$ is frozen, LoRA
learns a low-rank update $\Delta W$ expressed as:</p>

\[W' = W + \Delta W, \qquad \Delta W = B A,\]

<p>with $B \in \mathbb{R}^{d \times r}$ and $A \in \mathbb{R}^{r \times k}$ where
$r \ll \min(d, k)$. This keeps the additional parameters to $r\times(d + k)$
rather than $dk$. At inference time, the forward pass simply augments the frozen
projection:</p>

\[y = W x + B (A x),\]

<p>so we recover the adapted output without ever modifying the original weights.</p>

<h2 id="why-should-we-care-about-lora">Why Should We Care About LoRA?</h2>

<ol>
  <li><strong>Multi-tenant serving</strong>: Load the base model once and hot-swap lightweight
adapters to serve domain-specific variants—medical, legal, creative, and
more.</li>
  <li><strong>Lower training overhead</strong>: Because gradients and optimizer state only cover
the adapters, the hardware and memory requirements drop dramatically compared
with full finetuning.</li>
  <li><strong>Operational simplicity</strong>: Adapter checkpoints weigh only a few megabytes,
which makes versioning, sharing, and rolling back far easier than dealing
with full model shards.</li>
  <li><strong>Training complexity (simplicity)</strong>: Backpropagating through the full model
is typically the priciest part of training. LoRA saves compute because we
only calculate gradients for the tiny <code class="language-plaintext highlighter-rouge">A</code> and <code class="language-plaintext highlighter-rouge">B</code> matrices. LoRA leads to
roughly a 30% reduction in FLOPs per training step when you account for both
forward and backward passes.</li>
</ol>

<h2 id="can-lora-match-full-finetuning">Can LoRA Match Full Finetuning?</h2>

<p>A central theme in the post is “low regret” finetuning—scenarios where LoRA
achieves the same downstream performance as updating every parameter. The
results split into two regimes:</p>

<ul>
  <li><strong>Data-rich finetuning</strong>: When you have massive datasets, LoRA can run out of
capacity. The low rank update simply cannot encode the richer signal you get
from truly large-scale finetunes.</li>
  <li><strong>Typical post-training</strong>: For instruction tuning, domain adaptation, and
similar medium-sized datasets, LoRA keeps pace with full finetuning. As long
as the adapters are applied broadly across the network (not just attention
blocks), the gap largely disappears.</li>
</ul>

<h2 id="training-lessons-from-the-paper">Training Lessons from the Paper</h2>

<ul>
  <li><strong>Target all major weight matrices</strong>: LoRA adapters must cover MLP and MoE
layers in addition to attention. Early work focused on attention weights and
left a lot of performance on the table; most of the model’s information lives
in those feed-forward blocks.</li>
  <li><strong>Batch size sensitivity</strong>: Full finetuning tolerates larger batch sizes. LoRA
tends to degrade faster as you scale batches, so smaller batches are safer if
you want stable convergence.</li>
  <li><strong>Learning rate adjustments</strong>: Optimal learning rates ended up around
$10\times$ higher than the corresponding full finetunes. Because LoRA
initializes the <code class="language-plaintext highlighter-rouge">B</code> matrix to zero, the initial gradients are small, and a
larger learning rate kickstarts progress across tasks.</li>
</ul>

<h2 id="reinforcement-learning-is-different">Reinforcement Learning is Different</h2>

<p>The RL experiments were more positive than the supervised learning experiments.
With policy gradient methods, the LoRA adapters matched full finetuning
perfectly even with very low ranks (as low as <code class="language-plaintext highlighter-rouge">r=1</code>). The authors credit this to
the low information density of RL feedback as the training signal is coming from
a single episodic reward which is sparser when compared with richly supervised
datasets. If the total bits of feedback you can extract are small, then a small
adapter has more than enough capacity to memorize the needed adjustments.</p>

<h2 id="bottom-line">Bottom Line</h2>

<ul>
  <li>LoRA delivers near-full-finetuning quality on mainstream post-training tasks
while slashing memory and compute costs.</li>
  <li>Cover every major weight matrix—especially MLP and MoE layers—and nudge the
learning rate up by about an order of magnitude relative to full finetuning.</li>
  <li>Expect it to be the default choice for instruction tuning, domain
specialization, and even RL setups where the signal is sparse.</li>
</ul>

<h2 id="citation">Citation</h2>

<ul>
  <li><a href="https://thinkingmachines.ai/blog/lora/">Thinking Machines. (2025). “LoRA without Regret.” https://thinkingmachines.ai/blog/lora/</a></li>
  <li><a href="https://arxiv.org/pdf/2504.15777">Wang, S., Asilis, J., Akgül, Ö. F., Bilgin, E. B., Liu, O., &amp; Neiswanger, W. (2025). “Tina: Tiny reasoning models via lora”.</a></li>
</ul>]]></content><author><name>Eren Çetin</name><email>ecetin@student.ethz.ch</email></author><summary type="html"><![CDATA[My take-aways from the blog post on [LoRA without Regret](https://thinkingmachines.ai/blog/lora/).]]></summary></entry><entry><title type="html">RL-based Cart-Pole controller with Policy Gradient methods</title><link href="https://eren-cetin.github.io/posts/2025-09-03-rl-cartpole-ts/" rel="alternate" type="text/html" title="RL-based Cart-Pole controller with Policy Gradient methods" /><published>2025-09-03T00:00:00+03:00</published><updated>2025-09-03T00:00:00+03:00</updated><id>https://eren-cetin.github.io/posts/rl-cartpole-ts</id><content type="html" xml:base="https://eren-cetin.github.io/posts/2025-09-03-rl-cartpole-ts/"><![CDATA[<p>A browser-native reinforcement learning playground that lets you see CartPole
policies balance in real time, nudge them off centre, and watch how the control
loop recovers. It pairs a lightweight simulator with a model export path so you
can iterate on new policies and drop them straight into the demo.</p>

<h2 id="highlights">Highlights</h2>

<ul>
  <li>Real-time CartPole visualisation that runs fully in the browser (no installs).</li>
  <li>Manual keyboard/touch nudges for quick robustness checks.</li>
  <li>Fast turnaround from training to deployment: export a policy, reload the demo,
and compare behaviours side by side.</li>
  <li>Designed as a teaching aid for policy-gradient intuition and failure analysis.</li>
</ul>

<h2 id="try-it-live">Try It Live</h2>

<div style="text-align: center; margin: 20px 0;">
  <iframe src="/assets/demos/rl-cartpole/index.html" width="100%" height="500px" style="border: 1px solid #ccc; border-radius: 8px;" frameborder="0">
    Your browser does not support iframes.
    <a href="/assets/demos/rl-cartpole/index.html" target="_blank">Open demo in new window</a>
  </iframe>
</div>

<div style="text-align: center; margin: 10px 0;">
  <a href="/assets/demos/rl-cartpole/index.html" target="_blank" style="display: inline-block; padding: 10px 20px; background-color: #007cba; color: white; text-decoration: none; border-radius: 5px;">🚀 Open Full Screen Demo</a>
</div>

<h2 id="explore-the-project">Explore the Project</h2>

<p>The full source—frontend simulator, training environment, and ONNX export
utilities—is available on GitHub. The README walks through setup, training
recipes, and deployment tips.</p>

<ul>
  <li>Code &amp; documentation:
<a href="https://github.com/eren-cetin/balancing-bot">github.com/eren-cetin/balancing-bot</a></li>
  <li>Issues and pull requests welcome if you build new policies or extend the
training loop.</li>
</ul>

<h2 id="1-reinforce-on-cartpole">1. <code class="language-plaintext highlighter-rouge">REINFORCE</code> on CartPole</h2>

<p>The policy shipped with the demo is trained using REINFORCE, the vanilla
Monte-Carlo policy-gradient method. The objective is to maximise expected return</p>

\[J(\theta) = \mathbb{E}_{\tau \sim \pi_\theta}\left[\sum_{t=0}^{T-1} \gamma^t r_t\right],\]

<p>where a trajectory $\tau$ is a sequence of states $s_t$, actions $a_t$, and
rewards $r_t$ collected by rolling out the policy $\pi_\theta(a \mid s)$ in the
environment. CartPole provides a reward of $+1$ for every timestep the pole
stays balanced, so maximising $J(\theta)$ corresponds to keeping the pole
upright as long as possible.</p>

<p>REINFORCE estimates the gradient of this objective with Monte-Carlo returns. For
each timestep $t$ in an episode we compute the discounted return</p>

\[G_t = \sum_{k=t}^{T-1} \gamma^{\,k-t} r_k,\]

<p>and accumulate the score-function gradient</p>

\[\nabla_\theta J(\theta) \approx \frac{1}{N} \sum_{i=1}^N \sum_{t=0}^{T_i-1} G_t^{(i)} \, \nabla_\theta \log \pi_\theta\!\bigl(a_t^{(i)} \mid s_t^{(i)}\bigr),\]

<p>where $N$ is the number of sampled episodes in a batch and $T_i$ the length of
episode $i$. We use $\gamma = 0.99$ to gently prioritise early stability without
ignoring late-episode mistakes.</p>

<p>To reduce gradient variance we subtract a baseline $b_t$ (an exponential moving
average of returns) before applying the update:</p>

\[\theta \leftarrow \theta + \alpha \, \sum_{t=0}^{T-1} \bigl(G_t - b_t\bigr) \, \nabla_\theta \log \pi_\theta(a_t \mid s_t),\]

<p>with learning rate $\alpha = 1\times10^{-3}$. In practice we fit a small
two-layer MLP policy that outputs the logits for the two CartPole actions
(<code class="language-plaintext highlighter-rouge">left</code>, <code class="language-plaintext highlighter-rouge">right</code>). Episodes terminate when the pole falls or a 500-step cap is
reached; stable policies regularly hit the cap.</p>

<h3 id="training-loop-at-a-glance">Training loop at a glance</h3>

<ol>
  <li>Roll out $N$ CartPole episodes using the current policy.</li>
  <li>Compute returns $G_t$ and baseline-corrected advantages $A_t = G_t - b_t$.</li>
  <li>Accumulate $\nabla_\theta \log \pi_\theta(a_t \mid s_t)$ weighted by $A_t$.</li>
  <li>Apply the gradient step and update the baseline estimate.</li>
  <li>Repeat until the moving-average return surpasses the 500-step ceiling.</li>
</ol>

<p>The resulting policy checkpoint is exported to ONNX and bundled with the demo.
You can swap in your own checkpoints to compare alternative reward shaping or
architecture tweaks side by side.</p>]]></content><author><name>Eren Çetin</name><email>ecetin@student.ethz.ch</email></author><summary type="html"><![CDATA[Interactive CartPole playground for probing policy-gradient controllers, with live demo and full stack code on GitHub.]]></summary></entry><entry><title type="html">Interactive 3D Gaussian Splat Viewer</title><link href="https://eren-cetin.github.io/posts/2025-08-28-3dgs-viewer/" rel="alternate" type="text/html" title="Interactive 3D Gaussian Splat Viewer" /><published>2025-08-28T00:00:00+03:00</published><updated>2025-08-28T00:00:00+03:00</updated><id>https://eren-cetin.github.io/posts/3dgs-viewer</id><content type="html" xml:base="https://eren-cetin.github.io/posts/2025-08-28-3dgs-viewer/"><![CDATA[<p>An interactive web-based viewer for 3D Gaussian Splatting (3DGS) scenes built
with modern web technologies. This project demonstrates real-time rendering of
photorealistic 3D scenes using the efficient Gaussian splatting technique.</p>

<h2 id="technical-stack">Technical Stack</h2>

<ul>
  <li><strong>Three.js</strong>: 3D graphics library for WebGL rendering</li>
  <li><strong>TypeScript</strong>: Type-safe development</li>
  <li><strong>gsplat</strong>: Specialized library for Gaussian splatting visualization</li>
  <li><strong>Vite</strong>: Modern build tool for fast development</li>
</ul>

<h2 id="features">Features</h2>

<ul>
  <li>Interactive orbit controls for scene navigation</li>
  <li>Real-time rendering of 3D Gaussian splat data</li>
  <li>WebGL-accelerated performance</li>
  <li>Responsive design that adapts to different screen sizes</li>
  <li>Support for standard .splat file formats</li>
</ul>

<h2 id="live-demo">Live Demo</h2>

<p>Experience the interactive 3D Gaussian splat viewer directly in your browser:</p>

<div style="text-align: center; margin: 20px 0;">
  <iframe src="/assets/demos/gsplat-viewer/index.html" width="100%" height="500px" style="border: 1px solid #ccc; border-radius: 8px;" frameborder="0">
    Your browser does not support iframes.
    <a href="/assets/demos/gsplat-viewer/index.html" target="_blank">Open demo in new window</a>
  </iframe>
</div>

<div style="text-align: center; margin: 10px 0;">
  <a href="/assets/demos/gsplat-viewer/index.html" target="_blank" style="display: inline-block; padding: 10px 20px; background-color: #007cba; color: white; text-decoration: none; border-radius: 5px;">🚀 Open Full Screen Demo</a>
</div>]]></content><author><name>Eren Çetin</name><email>ecetin@student.ethz.ch</email></author><summary type="html"><![CDATA[Real-time 3D Gaussian Splatting visualization using Three.js, TypeScript, and WebGL]]></summary></entry></feed>