diff --git a/itemloaders/__init__.py b/itemloaders/__init__.py
index 090a73e..07bf48c 100644
--- a/itemloaders/__init__.py
+++ b/itemloaders/__init__.py
@@ -3,7 +3,6 @@ Item Loader
 
 See documentation in docs/topics/loaders.rst
 """
-from collections import defaultdict
 from contextlib import suppress
 
 from itemadapter import ItemAdapter
@@ -109,9 +108,10 @@ class ItemLoader:
         context['item'] = item
         self.context = context
         self.parent = parent
-        self._local_values = defaultdict(list)
+        self._local_values = {}
         # values from initial item
         for field_name, value in ItemAdapter(item).items():
+            self._values.setdefault(field_name, [])
             self._values[field_name] += arg_to_iter(value)
 
     @property
@@ -207,6 +207,7 @@ class ItemLoader:
         value = arg_to_iter(value)
         processed_value = self._process_input_value(field_name, value)
         if processed_value:
+            self._values.setdefault(field_name, [])
             self._values[field_name] += arg_to_iter(processed_value)
 
     def _replace_value(self, field_name, value):
@@ -272,15 +273,16 @@ class ItemLoader:
         """
         proc = self.get_output_processor(field_name)
         proc = wrap_loader_context(proc, self.context)
+        value = self._values.get(field_name, [])
         try:
-            return proc(self._values[field_name])
+            return proc(value)
         except Exception as e:
             raise ValueError("Error with output processor: field=%r value=%r error='%s: %s'" %
-                             (field_name, self._values[field_name], type(e).__name__, str(e)))
+                             (field_name, value, type(e).__name__, str(e)))
 
     def get_collected_values(self, field_name):
         """Return the collected values for the given field."""
-        return self._values[field_name]
+        return self._values.get(field_name, [])
 
     def get_input_processor(self, field_name):
         proc = getattr(self, '%s_in' % field_name, None)

Calling get_output_value causes loader to assign an "empty" value to field
# Description

If a field in an ItemLoader has not been set, calling `get_output_value` mistakenly assigns an empty object to that item. See the example bellow.

### Steps to Reproduce

```python
from scrapy.loader import ItemLoader
from scrapy import Item, Field

class MyItem(Item):
    field = Field()

loader = ItemLoader(MyItem())
```

Then, simply loading the item correctly produces an empty dict
```python
>>> loader.load_item()
{}
```

But calling `get_output_value` before that instantiates the field:
```python
>>> loader.get_output_value("field")
[]

>>> loader.load_item()
{'field': []}
```
diff --git a/tests/test_base_loader.py b/tests/test_base_loader.py
index f57d004..fdc3e5f 100644
--- a/tests/test_base_loader.py
+++ b/tests/test_base_loader.py
@@ -403,6 +403,12 @@ class BasicItemLoaderTest(unittest.TestCase):
         self.assertRaises(ValueError, il.add_value, 'name',
                           ['marta', 'other'], Compose(float))
 
+    def test_get_unset_value(self):
+        loader = ItemLoader()
+        self.assertEqual(loader.load_item(), {})
+        self.assertEqual(loader.get_output_value('foo'), [])
+        self.assertEqual(loader.load_item(), {})
+
 
 class BaseNoInputReprocessingLoader(ItemLoader):
     title_in = MapCompose(str.upper)

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov
3.9
docs/requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.16
babel==2.17.0
certifi==2025.1.31
charset-normalizer==3.4.1
coverage==7.8.0
cssselect==1.3.0
docutils==0.21.2
exceptiongroup==1.2.2
idna==3.10
imagesize==1.4.1
importlib_metadata==8.6.1
iniconfig==2.1.0
itemadapter==0.11.0
-e git+https://github.com/scrapy/itemloaders.git@98ad3a5678d1a2fe373a052266675da1fff9e1f5#egg=itemloaders
Jinja2==3.1.6
jmespath==1.0.1
lxml==5.3.1
MarkupSafe==3.0.2
packaging==24.2
parsel==1.10.0
pluggy==1.5.0
Pygments==2.19.1
pytest==8.3.5
pytest-cov==6.0.0
requests==2.32.3
snowballstemmer==2.2.0
Sphinx==7.4.7
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
tomli==2.2.1
urllib3==2.3.0
w3lib==2.3.1
zipp==3.21.0

name: itemloaders
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.16
      - babel==2.17.0
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - coverage==7.8.0
      - cssselect==1.3.0
      - docutils==0.21.2
      - exceptiongroup==1.2.2
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==8.6.1
      - iniconfig==2.1.0
      - itemadapter==0.11.0
      - jinja2==3.1.6
      - jmespath==1.0.1
      - lxml==5.3.1
      - markupsafe==3.0.2
      - packaging==24.2
      - parsel==1.10.0
      - pluggy==1.5.0
      - pygments==2.19.1
      - pytest==8.3.5
      - pytest-cov==6.0.0
      - requests==2.32.3
      - snowballstemmer==2.2.0
      - sphinx==7.4.7
      - sphinx-rtd-theme==3.0.2
      - sphinxcontrib-applehelp==2.0.0
      - sphinxcontrib-devhelp==2.0.0
      - sphinxcontrib-htmlhelp==2.1.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==2.0.0
      - sphinxcontrib-serializinghtml==2.0.0
      - tomli==2.2.1
      - urllib3==2.3.0
      - w3lib==2.3.1
      - zipp==3.21.0
prefix: /opt/conda/envs/itemloaders

tests/test_base_loader.py::BasicItemLoaderTest::test_get_unset_value
tests/test_base_loader.py::BasicItemLoaderTest::test_add_value tests/test_base_loader.py::BasicItemLoaderTest::test_add_zero tests/test_base_loader.py::BasicItemLoaderTest::test_compose_processor tests/test_base_loader.py::BasicItemLoaderTest::test_default_input_processor tests/test_base_loader.py::BasicItemLoaderTest::test_default_output_processor tests/test_base_loader.py::BasicItemLoaderTest::test_empty_map_compose tests/test_base_loader.py::BasicItemLoaderTest::test_error_input_processor tests/test_base_loader.py::BasicItemLoaderTest::test_error_output_processor tests/test_base_loader.py::BasicItemLoaderTest::test_error_processor_as_argument tests/test_base_loader.py::BasicItemLoaderTest::test_extend_custom_input_processors tests/test_base_loader.py::BasicItemLoaderTest::test_extend_default_input_processors tests/test_base_loader.py::BasicItemLoaderTest::test_get_value tests/test_base_loader.py::BasicItemLoaderTest::test_identity_input_processor tests/test_base_loader.py::BasicItemLoaderTest::test_inherited_default_input_processor tests/test_base_loader.py::BasicItemLoaderTest::test_input_processor_inheritance tests/test_base_loader.py::BasicItemLoaderTest::test_item_passed_to_input_processor_functions tests/test_base_loader.py::BasicItemLoaderTest::test_iter_on_input_processor_input tests/test_base_loader.py::BasicItemLoaderTest::test_load_item_ignore_none_field_values tests/test_base_loader.py::BasicItemLoaderTest::test_load_item_using_custom_loader tests/test_base_loader.py::BasicItemLoaderTest::test_load_item_using_default_loader tests/test_base_loader.py::BasicItemLoaderTest::test_loader_context_on_assign tests/test_base_loader.py::BasicItemLoaderTest::test_loader_context_on_declaration tests/test_base_loader.py::BasicItemLoaderTest::test_loader_context_on_instantiation tests/test_base_loader.py::BasicItemLoaderTest::test_map_compose_filter tests/test_base_loader.py::BasicItemLoaderTest::test_map_compose_filter_multil tests/test_base_loader.py::BasicItemLoaderTest::test_output_processor_error tests/test_base_loader.py::BasicItemLoaderTest::test_output_processor_using_classes tests/test_base_loader.py::BasicItemLoaderTest::test_output_processor_using_function tests/test_base_loader.py::BasicItemLoaderTest::test_partial_processor tests/test_base_loader.py::BasicItemLoaderTest::test_replace_value tests/test_base_loader.py::BasicItemLoaderTest::test_self_referencing_loader tests/test_base_loader.py::NoInputReprocessingFromDictTest::test_avoid_reprocessing_with_initial_values_list tests/test_base_loader.py::NoInputReprocessingFromDictTest::test_avoid_reprocessing_with_initial_values_single tests/test_base_loader.py::NoInputReprocessingFromDictTest::test_avoid_reprocessing_without_initial_values_list tests/test_base_loader.py::NoInputReprocessingFromDictTest::test_avoid_reprocessing_without_initial_values_single
itemloaders/__init__.py
itemloaders/__init__.py